chmod
Change file access permissions using symbolic or octal notation.
Synopsis
chmod [OPTION]... MODE FILE...
Examples
chmod 755 script.sh
chmod +x deploy.sh
chmod -R 644 content/
chmod u+w,go-w file.txt
chmod --reference=ref.txt target.txt
Common options
| Flag | Description |
|---|---|
| -R | Change files and directories recursively |
| -v | Verbose — output each processed file |
| -c | Like -v but report only changes |
| --reference | Copy permissions from reference file |
About chmod
The `chmod` command change file access permissions using symbolic or octal notation. File permission commands control access to files and directories on Linux.
The Unix permission model uses owner, group, and other categories with read, write, and execute bits. Properly managing permissions is essential for system security, multi-user environments, and running services that require specific access levels.
The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man chmod`). The 5 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More File Permissions Commands
Other commands in the File Permissions category