You can achieve this with the less often used four digit parameter to chmod. ie "chmod n755" where n made up as follows:
1 = sticky bit
2 = SGID
4 = SUID
So "chmod 1755 filename" will set the sticky bit plus 755 permissions. Alternatively, "chmod +t filename" allows you to set the sticky bit whilst leaving all other permissions in tact ("chmod -t filename" to unset it).
Type "man chmod" to see a more comprehensive explanation of chmod.


Reply With Quote


Bookmarks