Chmod Calculator
Generate chmod commands and decode file permissions for Unix/Linux systems
Set File Permissions
User/Owner
Group
Others
Chmod Command & Results
Common Permission Examples
Executable files, scripts
Regular files, documents
Private files (owner only)
Full access (not recommended)
Private executables
Shared writable files
Permission Values
Special Permissions
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)