…
…
Use this chmod permissions calculator to quickly generate the correct numeric (octal) and symbolic permission values for Linux files and directories. Select the read, write, and execute permissions you need, and the tool will output a valid numeric value that you can apply with the chmod command.
This tool is ideal for developers, system administrators, DevOps engineers, and anyone working with the Linux file system, servers, or Unix-based environments such as Ubuntu, macOS, or WSL on Windows.
A file permission is a rule that controls how users access a file or directory. Permissions determine whether someone can:
For Developers, DevOps Engineers, Server Admins, and IT professionals, understanding and managing file permissions is fundamental to maintaining a secure environment.
Linux divides permissions into three categories:
Each category has a triad of permissions represented as rwx:
| Character | Meaning |
|---|---|
| r | Read |
| w | Write |
| x | Execute |
Linux file permissions help you:
Understanding permissions is essential whether you operate servers, develop software, or manage shared environments.
chmod 755 filenameYou can directly enter the current octal value to modify permissions or use symbolic format to adjust permissions relative to their current settings.
Linux provides two primary formats for changing permissions:
Each permission has a numeric value:
| Permission | Value |
|---|---|
| Read (r) | 4 |
| Write (w) | 2 |
| Execute (x) | 1 |
Add them together to get the triad value:
Example:
chmod 755 filenameMeans:
Symbolic format uses letters to assign permissions:
| Symbol | Meaning |
|---|---|
| u | User/Owner |
| g | Group |
| o | Others |
| a | All |
| + | Add permissions |
| - | Remove permissions |
| = | Set exact permissions |
Examples:
chmod u+x filename # add execute permissions for user
chmod g-w filename # remove write permissions from group
chmod o+r filename # add read permissions for others
chmod a+w filename # allow all users to writeUse:
ls -lOutput example:
-rwxr-xr--This reveals:
Directory permissions differ slightly:
Common commands:
chmod +rwx directoryname
chmod -rwx directoryname
chmod +x filename
chmod -wx filenameThese advanced modes extend Linux permissions:
| Octal Value | Permission | Meaning |
|---|---|---|
| 4000 | SetUID (set user ID) | Run with file owner privileges |
| 2000 | SetGID (set group ID) | Run with group privileges or inherit group |
| 1000 | Sticky Bit | Prevent others from deleting files in shared directories |
Common use cases:
chmod 755 file # rwxr-xr-x
chmod 644 file # rw-r--r--
chmod 700 script.sh # rwx------
chmod -R 644 directory # recursive apply
chmod u=rwx,g=rx,o= # symbolic assignment| Octal | Meaning |
|---|---|
| 0 | --- |
| 1 | --x |
| 2 | -w- |
| 3 | -wx |
| 4 | r-- |
| 5 | r-x |
| 6 | rw- |
| 7 | rwx |
The chmod command is frequently used in:
Setting correct permissions ensures:
Avoid:
These tools complement the chmod system and help ensure full control and safety of your Linux environment.
I think it’s a new feature. Don’t tell anyone it was an accident.
…