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?
This sets the sticky bit on the directory /project/access2all. The sticky bit ensures that only the owner of a file can delete or rename it within that directory, preventing non-owners from deleting or modifying files they do not own.
A. Just look for yourself: 'ls -ld /tmp'. This directory accomplishes the goal of the question. That was done in octal 'chmod 1777 /tmp' or in UGO shorthand 'chmod +t /tmp'. 2770 is the setGID bit, explained by DRVison.
Option A, chmod +t /project/access2all, is better than option C, chmod 2770 /project/access2all, for preventing the deletion or modification of files from non-owners because of the following reasons:
Sticky Bit: Option A sets the sticky bit on the directory. The sticky bit restricts deletion or renaming of files within the directory to the file owners, the directory owner, or the root user. This means even if a user has write permission to the directory, they cannot delete or rename files owned by others.
Setgid and Permissions: Option C sets the setgid bit and gives the group read, write, and execute permissions. The setgid bit causes new files and directories created in the directory to inherit the group ownership of the directory, but it does not prevent file deletion or modification by non-owners. The permissions 770 give the owner and the group full permissions (read, write, execute), but they do not prevent file deletion or modification by non-owners who are in the group.
Therefore, to specifically prevent deletion or modification of files from non-owners, option A is the better choice.
C. chmod 2770 /project/access2all.
This option sets the setgid (chmod +2) and the permissions rwx (chmod 700) on the directory. This means that files created within the directory will inherit the group ownership of the directory, rather than the user's primary group, and members of the group will have full permissions to read, write, and execute files within the directory. Non-group members will not have access to the directory. This helps to ensure that files created within the directory can only be modified by members of the group and not by non-owners.
I meant to say, the sticky bit denies to other users the right to delete or RENAME a file. the question states "MODIFY and delete" for non-ownerS. Im guessing here by non ownerS means users that belong to a group. terrible wording but since its stating modify not rename Im going for C.
Answer A (chmod +t /project/access2all) sets the sticky bit on the directory, but this only affects the ability of regular users to delete files. The sticky bit does not prevent regular users from modifying files within the directory. To prevent modification of files within the directory by non-owners, you would need to set more restrictive permissions using chmod or using access control lists (ACLs).
So, answer A is not the correct solution to the problem of preventing the modification or deletion of files within the directory by non-owners.
You are wrong. The sticky bit does prevent users, other than the owner, to delete files. The question is asking for a solution that will prevent non- owner(groups and others) from deleting files. chmod +t will do the job.
Answer C is giving rwx to groups (non-owner)
This section is not available anymore. Please use the main Exam Page.XK0-005 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
IFBBPROSALCEDO
5 months, 1 week agoe418137
9 months agoDRVision
11 months agoAlizadeh
1 year, 2 months agolinux_admin
1 year, 8 months agotutita
1 year, 5 months agotutita
1 year, 5 months agolinux_admin
1 year, 8 months agoBreakOff874
1 year, 8 months agoHuckleberry
1 year, 9 months ago