XK0-005 · Question #722
A Linux administrator wants a permission bit on a shared folder that allows only the owner of the file within that directory or the root user to delete or rename the file. Which of the following…
The correct answer is C. chmod o+t /directory/. The t bit, also known as the sticky bit, is used in shared directories to control file deletion. When the sticky bit is set on a directory: Only the owner of the file, the owner of the directory, or the root user can delete or rename files within that directory. Other users…
Question
A Linux administrator wants a permission bit on a shared folder that allows only the owner of the file within that directory or the root user to delete or rename the file. Which of the following commands will help achieve this goal?
Options
- Achmod u+w /directory/
- Bchmod a+r /directory/
- Cchmod o+t /directory/
- Dchmod g+s /directory/
How the community answered
(30 responses)- A17% (5)
- B7% (2)
- C73% (22)
- D3% (1)
Explanation
The t bit, also known as the sticky bit, is used in shared directories to control file deletion. When the sticky bit is set on a directory: Only the owner of the file, the owner of the directory, or the root user can delete or rename files within that directory. Other users, even if they have write permissions to the directory, cannot delete or rename files that they do not own. The command chmod o+t /directory/ sets the sticky bit on the directory, achieving the desired behavior for a shared folder where only the owner of the files or the root user can delete
Topics
Community Discussion
No community discussion yet for this question.