chmod +s filename
, , .
chmod [ugoa]+s filename
u, g, o a.
Unix, , /. , , , . , . , , , , .
chmod , . , u, g, o a. "u" , "g" , "o" "a" .
:
chmod ga-r confidential.txt , 'secret.txt'. , , "privacy.txt"
chmod ga-rwx really_confidential.txtwill ensure that no one other than the owner of this file can read, write or execute "really_confidential.txt". In other words, you remove the ability to read, write, or execute "really_confidential.txt" from all users except the owner.
chmod u+s filename adds a sticky bit to 'filename', only for the owner of this file.
EDIT: Oh yes, and since the file is owned by root, be sure to imagine the command you issue with 'sudo'. But it looks like you already know that.
source
share