Re: Permissions
2006-11-3, 17:33(+00), Jordan Abel:
> 2006-11-03 <slrnekmqoq.9pf.stephane.chazelas@spam.is.invalid> ,
> Stephane CHAZELAS wrote:
>> Beware that for "x", it's more complicated, as you may have a s,
>> S, t or T instead. See ls or chmod man page for details.
>
> To check x, you'd use ???[xs]* ??????[xs]* ?????????[xt]* - capital
> S and T means the sticky/setid bit is set and the execute bit is not.
And the part for root changed to:
if [ "$uid" -eq 0 ]; then
case $1 in
(???[!xs]??[!xs]??[!xt]*) return 1;;
esac
return 0
fi
--
Stéphane
|