Chmod Calculator

Generate chmod commands and decode file permissions for Unix/Linux systems

Set File Permissions

User/Owner

7

Group

5

Others

5

Chmod Command & Results

Command:
chmod 755 filename
Octal
755
Symbolic
rwxr-xr-x
Binary
111101101

Common Permission Examples

755rwxr-xr-x

Executable files, scripts

644rw-r--r--

Regular files, documents

600rw-------

Private files (owner only)

777rwxrwxrwx

Full access (not recommended)

700rwx------

Private executables

666rw-rw-rw-

Shared writable files

Permission Values

Read (r)4
Write (w)2
Execute (x)1

Special Permissions

Setuid4
Setgid2
Sticky Bit1

Chmod Tips

💡

Use 755 for executable files and scripts

💡

Use 644 for regular files and documents

💡

Avoid 777 permissions for security

💡

Check permissions with `ls -l` command

Understanding Unix File Permissions

What is Chmod?

Chmod (change mode) is a Unix/Linux command used to change file and directory permissions. It controls who can read, write, or execute files and directories on the system.

Permission Classes

  • •User/Owner: The user who owns the file
  • •Group: Users who are members of the file's group
  • •Others: All other users on the system

Permission Types

Read (r) - Value 4

View file contents or list directory contents

Write (w) - Value 2

Modify file contents or create/delete files in directory

Execute (x) - Value 1

Run file as program or access directory

Special Permissions

Setuid (4)

File executes with owner privileges instead of executor's privileges

Setgid (2)

File executes with group privileges, or new files inherit group ownership

Sticky Bit (1)

Only file owner can delete files in directory (e.g., /tmp)

Usage Examples

chmod 755 script.sh - Make script executable
chmod 644 document.txt - Set file as readable
chmod -R 755 /path/to/directory - Apply recursively
chmod u+x file.sh - Add execute permission for user