LX0-103 · Question #121
Which of the following file permissions belong to a symbolic link?
The correct answer is C. lrwxrwxrwx. In Linux, the first character of a file's permission string indicates the file type, and 'l' designates a symbolic link.
Question
Which of the following file permissions belong to a symbolic link?
Options
- A-rwxrwxrwx
- B+rwxrwxrwx
- Clrwxrwxrwx
- Dsrwxrwxrwx
How the community answered
(48 responses)- A2% (1)
- C94% (45)
- D4% (2)
Why each option
In Linux, the first character of a file's permission string indicates the file type, and 'l' designates a symbolic link.
A leading hyphen '-' indicates a regular ordinary file, not a symbolic link.
A '+' prefix is not a valid leading file type indicator; it appears as a suffix in 'ls -l' output to signal that extended ACL permissions are set on the file.
The permission string 'lrwxrwxrwx' correctly identifies a symbolic link because the leading 'l' is the file type indicator used by the Linux filesystem for symlinks. When running 'ls -l', symbolic links always display 'l' as the first character and conventionally show all permissions as rwxrwxrwx since access control is delegated to the target file.
A leading 's' indicates a socket file, not a symbolic link.
Concept tested: Linux file type indicators in permission strings
Source: https://man7.org/linux/man-pages/man1/ls.1.html
Topics
Community Discussion
No community discussion yet for this question.