LFCA · Question #28
LFCA Question #28: Real Exam Question with Answer & Explanation
The correct answer is B: chmod. The chmod command (change mode) is the standard Unix/Linux utility used to change the file system permissions of files and directories. It allows users to control read, write, and execute access for the owner, group, and others.
Question
What command is used to set or change permission attributes of files (such as read, write, execute)?
Options
- Achacl
- Bchmod
- Cchown
- Dsetattr
Explanation
The chmod command (change mode) is the standard Unix/Linux utility used to change the file system permissions of files and directories. It allows users to control read, write, and execute access for the owner, group, and others.
Common mistakes.
- A. The
chaclcommand is used to modify Access Control Lists (ACLs) on files and directories, which are a more granular permission system than standard Unix permissions, butchmodaddresses the basic read/write/execute attributes. - C. The
chowncommand (change owner) is used to change the user owner and/or group owner of a file or directory, not its permission attributes. - D. The
setattrfunction is a system call used by programs to set file attributes, but it is not a direct command-line utility for users to change file permissions.
Concept tested. Linux file permissions
Reference. https://man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.