| Command | Description | Syntax/Usage | Example | Notes |
| chmod | Changes the access rights of files and directories. | chmod [options] mode file | CHMOD 755 script.sh | Mode can be numeric or symbolic. |
| Chown | Changes the owner and/or group of files. | chown [options] [owner][:group] file | chown root:users data.txt | Often requires root privileges. |
| chgrp | Changes the group membership of files. | chgrp [Options] Group File | chgrp developers project/ | Can be used by users who are members of the group. |
| umask | Sets the default rights for newly created files. | umask [Options] [Mask] | umask 022 | Set in shells or scripts. |
| ls -l | Lists files with detailed information, including permissions. | ls -l [Options] [File/Directory] | ls -l /var/www/ | Useful for checking permissions. |
| stat | Displays detailed status information about files. | stat [Options] File | stat index.html | Displays permissions and owners, among other things. |
| getfacl | Displays the Access Control Lists (ACLs) of files. | getfacl [Options] File | getfacl /home/user | ACLs allow finer permissions. |
| Setfacl | Sets or modifies the ACLs of files. | setfacl [Options] ACL File | setfacl -m u:username:rwx /shared | May need to be installed. |
| sudo | Executes commands with the privileges of another user (root by default). | sudo [command] | sudo chmod 644 /etc/passwd | User must be entered in the sudoers file. |
| su | Switch to a different user account. | su [Options] [Username] | su – root | Without an argument, it switches to root. |
| find | Searches for files and can perform actions on them. | find [path] [criteria] [action] | find /var/www -type f -exec chmod 644 {} \; | Useful for bulk changes. |
- Numeric vs. symbolic mode specifications in chmod:
- Numeric: Use numbers to set permissions.
- Example: chmod 755 file sets permissions to rwxr-xr-x.
- Symbolic: Use icons to change specific permissions.
- Example: chmod u+rwx,g+rx,o+rx file.
- Numeric: Use numbers to set permissions.
- umask values:
- The umask value is subtracted from the maximum permissions.
- Example: umask 022 causes new files to receive permission 755 (777 – 022).
- ACLs (getfacl and setfacl):
- Allow permissions to be assigned to individual users or groups.
- Not enabled by default on all file systems.
Platform-specific differences:
- Some distributions require getfacl and setfacl to be installed via the acl package.
- Ubuntu/Debian: sudo apt-get install acl
- RHEL/CentOS: sudo yum install acl
- The use of sudo can be configured differently depending on the distribution.
- Ubuntu: sudo is enabled by default, root account is disabled.
- RHEL/CentOS: Root account is activated, sudo may need to be configured.

