172k views
2 votes
What does chmod +t do?

1) wrong syntax
2) set effective userid for filename
3) set effective groupid for filename

User Drabuna
by
7.2k points

1 Answer

3 votes

Final answer:

The 'chmod +t' command sets the sticky bit on a directory, which protects files within by allowing only owners and the root user to rename, move, or delete them, even if directory permissions would allow others to do so.

Step-by-step explanation:

When using the chmod command in Unix or Linux, adding the +t option sets the sticky bit on a directory. This special permission bit ensures that files within the directory can only be renamed, moved, or deleted by the file's owner, directory's owner, or the root user, even if the directory's permissions would otherwise allow such actions. The sticky bit is often set on world-writable directories like /tmp to prevent users from deleting or moving other users' files. Therefore, the correct answer to the question 'What does chmod +t do?' is none of the provided options; instead, it sets the sticky bit for the specified filename, typically a directory.

User Stephen Weinberg
by
8.8k points