Chmod Calculator
Chmod Calculator is a free online tool that helps you convert Linux file permissions between symbolic and numeric (octal) formats instantly. Whether you're trying to understand what chmod 755 means in terms of read, write, and execute permissions, or you need to calculate the octal value for a specific combination of user/group/other permissions, this calculator makes it easy. It displays permissions for Owner, Group, and Others with intuitive checkboxes for Read (r), Write (w), and Execute (x) on Linux, macOS, and Unix-based systems. The tool also supports special permission flags like SetUID, SetGID, and Sticky Bit for advanced permission scenarios.
What Is
chmod (change mode) is a Unix/Linux command that sets the permissions of files and directories. Each file has three types of permissions: Read (r), Write (w), and Execute (x), set independently for three categories of users: Owner (the file's creator), Group (members of the file's group), and Others (everyone else). Permission values explained: - Read (r) = 4: For files, allows viewing the file contents. For directories, allows listing files inside. - Write (w) = 2: For files, allows modifying the file. For directories, allows creating/deleting files inside. - Execute (x) = 1: For files, allows running the file as a program or script. For directories, allows accessing (cd into) the directory. Octal notation combines these values: - 7 (4+2+1) = Read + Write + Execute (rwx) - 6 (4+2) = Read + Write (rw-) - 5 (4+1) = Read + Execute (r-x) - 4 = Read only (r--) - 0 = No permissions (---) Common chmod values: - 755 (rwxr-xr-x): Owner has full access, group and others can read and execute. Standard for executables and directories. - 644 (rw-r--r--): Owner can read and write, group and others can only read. Standard for regular files. - 777 (rwxrwxrwx): Everyone has full access. Rarely recommended due to security risks. - 700 (rwx------): Only the owner has full access. Used for private scripts. - 600 (rw-------): Only the owner can read and write. Used for sensitive files like SSH keys. Special permission flags: - SetUID (4000): File executes with the owner's privileges, regardless of who runs it. - SetGID (2000): File executes with the group's privileges. On directories, new files inherit the group. - Sticky Bit (1000): Only the file owner can delete/rename files in a directory. Used in /tmp.
How to Use
- Select permissions for the Owner (User) by checking the Read, Write, and Execute checkboxes. The octal value updates automatically as you toggle each checkbox.
- Set permissions for the Group by checking the appropriate Read, Write, and Execute checkboxes. Group permissions apply to all users in the file's assigned group.
- Configure permissions for Others (everyone else on the system) using the same Read, Write, and Execute checkboxes. Be cautious with Write permission for Others as it allows any user to modify the file.
- Optionally enable special permission flags: SetUID (file runs with owner's privileges), SetGID (file runs with group's privileges), or Sticky Bit (restricts file deletion in directories).
- View the generated chmod command in the output area. It displays both the numeric (octal) format like 'chmod 755 filename' and the symbolic format like 'chmod u=rwx,g=rx,o=rx filename'.
- Copy the chmod command to your clipboard and paste it directly into your Linux/Unix terminal. The command is ready to use with your target file or directory name.
Examples
Input: User: rwx, Group: r-x, Other: r-x
Process: r=4,w=2,x=1 → 7,5,5
Result: chmod 755
Input: Full access for all
Process: 7+7+7 = rwx rwx rwx
Result: chmod 777
Input: Owner read-only, others no access
Process: 4+0+0 = r-- --- ---
Result: chmod 400
Related Searches
People also search for: chmod calculator, linux permissions, chmod command, file permissions.
chmod calculatorlinux permissionschmod commandfile permissions
Frequently Asked Questions
What does chmod 755 mean exactly?
chmod 755 means: Owner gets 7 (Read+Write+Execute = rwx), Group gets 5 (Read+Execute = r-x), and Others get 5 (Read+Execute = r-x). In symbolic notation, this is rwxr-xr-x. It is the most common permission for executable files and web directories because the owner has full control while others can read and execute but not modify the file.
What is the difference between chmod 644 and chmod 666?
chmod 644 (rw-r--r--) gives the owner read+write access, while group and others get read-only access. chmod 666 (rw-rw-rw-) gives everyone (owner, group, and others) read+write access. The 644 setting is standard for web files (HTML, CSS, images) because it prevents unauthorized users from modifying your files while still allowing the web server to read them.
When should I use chmod 777?
Almost never. chmod 777 gives every user on the system full read, write, and execute access to the file or directory. This is a significant security risk because any user or process can modify or delete the file. If you're having permission issues, try 755 for directories and 644 for files first. Only use 777 as a temporary troubleshooting step, and always revert to more restrictive permissions afterward.
What is the SetUID bit and when is it used?
SetUID (Set User ID) is a special permission that causes an executable to run with the privileges of the file's owner rather than the user who launched it. The most famous example is /usr/bin/passwd, which needs root privileges to modify /etc/shadow. SetUID is represented by an 's' in the owner's execute position (rwsr-xr-x) or by adding 4000 to the octal value (e.g., chmod 4755). Use SetUID sparingly as it can create security vulnerabilities.
How do I apply chmod recursively to all files in a directory?
Use the -R (recursive) flag: chmod -R 755 /path/to/directory. This applies the permission to the directory and all files and subdirectories within it. Be careful with recursive chmod, especially with 777, as it can expose all files in the tree. A common pattern is to set directories to 755 and files to 644 separately using find: find /path -type d -exec chmod 755 {} \; and find /path -type f -exec chmod 644 {} \;.