Users with write permission in a directory can delete the files created by other users. This lets users to destroy the data created by other users.
But with sticky bit set on a directory one can only delete the files created by him.
Setting sticky bit on a directory
By symbolic method:
#chmod o+t directory_path
eg:
#chmod o+t /resumes
By numeric method:
If the current permission of the directory is 664, then
#chmod 1664 /resumes
1 on the left end of the permission sets the sticky bit.
Now on the file can be deleted only by the owner of the file.
No comments:
Post a Comment