LFCA · Question #28
What command is used to set or change permission attributes of files (such as read, write, execute)?
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
How the community answered
(52 responses)- A2% (1)
- B87% (45)
- C4% (2)
- D8% (4)
Why each option
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.
The `chacl` command is used to modify Access Control Lists (ACLs) on files and directories, which are a more granular permission system than standard Unix permissions, but `chmod` addresses the basic read/write/execute attributes.
The `chmod` command, short for 'change mode', is used in Unix-like operating systems to change the access permissions of file system objects (files and directories). These permissions include read (r), write (w), and execute (x) for different user categories (owner, group, others).
The `chown` command (change owner) is used to change the user owner and/or group owner of a file or directory, not its permission attributes.
The `setattr` function 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
Source: https://man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.