What type of file attribute would prevent users from modifying or deleting a file they do not own?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The sticky bit is a special permission that is applied to directories, primarily in a multi-user environment. When the sticky bit is set on a directory, it ensures that only the owner of a file within that directory has the permission to delete or rename that file, regardless of the permissions set on the file itself.

This is particularly useful for shared directories like /tmp, where multiple users may have the ability to create and write files. The sticky bit helps to enhance security by preventing users from inadvertently or maliciously deleting or altering files owned by others. Hence, it plays a key role in maintaining data integrity in collaborative settings.

In contrast, the read-only attribute allows files to be viewed but not modified; however, it does not prevent deletion. An executable attribute identifies files that can be executed as programs, but again, this does not provide any protection against deletion or modification. The read-write attribute, as the name suggests, allows files to be read and modified, which would not help in preventing users from touching files they do not own. Thus, the sticky bit is indeed the attribute that serves the purpose of restricting alterations and deletions to the file owners only.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy