ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 67 - XK0-005 discussion

Report
Export

A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?

A.
chmod +t /project/access2all
Answers
A.
chmod +t /project/access2all
B.
chmod +rws /project/access2all
Answers
B.
chmod +rws /project/access2all
C.
chmod 2770 /project/access2all
Answers
C.
chmod 2770 /project/access2all
D.
chmod ugo+rwx /project/access2all
Answers
D.
chmod ugo+rwx /project/access2all
Suggested answer: A

Explanation:

The command that will accomplish the goal of avoiding the deletion or modification of files from non-owners is chmod +t /project/access2all. This command will set the sticky bit on the directory /project/access2all, which is a special permission that restricts file deletion or renaming to only the file owner, directory owner, or root user. This way, even if multiple users have write permission to the directory, they cannot delete or modify each other's files.

The other options are not correct commands for accomplishing the goal. The chmod +rws /project/access2all command will set both the SUID and SGID bits on the directory, which are special permissions that allow a program or a directory to run or be accessed with the permissions of its owner or group, respectively. However, this does not prevent file deletion or modification from nonowners.

The chmod 2770 /project/access2all command will set only the SGID bit on the directory, which means that any new files or subdirectories created in it will inherit its group ownership. However, this does not prevent file deletion or modification from non-owners. The chmod ugo+rwx /project/access2all command will grant read, write, and execute permissions to all users (user, group, and others) on the directory, which means that anyone can delete or modify any file in it. Reference: chmod(1) - Linux manual page; How to Use SUID, SGID, and Sticky Bits on Linux

asked 02/10/2024
Delano van Kleinwee
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first