SK0-004 · Question #460
Which of the following are the MOST appropriate permissions to set on files required to be publicly accessible but only modified by the file's original owner?
The correct answer is A. rw-rw-r--. The permission set rw-rw-r-- is the most appropriate because it allows public read access while restricting write access from others, making files viewable by everyone but not writable by the general public.
Question
Which of the following are the MOST appropriate permissions to set on files required to be publicly accessible but only modified by the file's original owner?
Options
- Arw-rw-r--
- Br--r--r--
- Crwxrwxr--
- Drwxrwxr-x
How the community answered
(21 responses)- A76% (16)
- B5% (1)
- C5% (1)
- D14% (3)
Why each option
The permission set rw-rw-r-- is the most appropriate because it allows public read access while restricting write access from others, making files viewable by everyone but not writable by the general public.
rw-rw-r-- (octal 664) grants the owner read and write, the group read and write, and all others read-only access. Among the given choices, it is the only set that provides public readability without granting others write or execute permissions, most closely satisfying the requirement of public access with restricted modification rights.
r--r--r-- is read-only for everyone including the owner, meaning the file's original owner cannot modify it, which violates the requirement.
rwxrwxr-- grants execute permissions to owner and group, which are unnecessary for data files, and also allows group members to modify the file beyond the stated intent.
rwxrwxr-x grants execute permissions to all users including others, and allows group write access, making it more permissive than required and not limiting modification to the owner.
Concept tested: Linux file permission modes and access control
Source: https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html
Topics
Community Discussion
No community discussion yet for this question.