Who can delete a file in a directory?
IntermediateConceptPermissions, Users & sudo
Answer
Anyone with write and execute permission on the directory, regardless of the file's own permissions or owner. A read-only file owned by root can be deleted by a user who owns the directory. The exception is the sticky bit, which restricts deletion to the file owner, directory owner, or root.
More on Permissions, Users & sudo
Explain the rwx permission model for files and directories.BeginnerHow does octal notation work in chmod?BeginnerWhat does chown do and who can run it?IntermediateWhat is umask and how is the final permission calculated?IntermediateWhat is SUID and give a real example?IntermediateWhat does SGID do on files versus directories?Intermediate