chmod permissions
Octal, symbolic and command
No database: AIMRAN doesn't store your files, text or results
What is chmod permissions?
On Linux and macOS every file has permissions that say who can read, modify or execute it. They're written with numbers like 755 or letters like rwxr-xr-x, and it isn't always easy to remember what each one means.
With this calculator you tick the read, write and execute boxes for the owner, group and others, and get the number and the chmod command ready to paste into the terminal.
How to use it
- Tick read, write and execute permissions for owner, group and others.
- Or type the octal or symbolic value directly.
- Turn on the special setuid, setgid or sticky bits if you need them.
- Enter the file or folder name and turn on “Recursive (-R)” if needed.
- Copy the generated chmod command.
Advantages
- Two-way conversion between octal, symbolic and checkboxes.
- Special setuid, setgid and sticky bits.
- Command in numeric and letter form (u=rwx,g=rx,o=rx).
- Free, with no sign-up.
Use cases
- Know which permissions to give a website's files and folders on the server, such as 644 and 755.
- Understand what rwxr-xr-x means in ls -l output before changing anything.
- Set 600 permissions on a private SSH key that SSH rejects for being too open.
- Get the command to make a bash script executable without opening it up to every user.
Technical details
Each permission group (owner, group and others) is encoded as one octal digit by adding read = 4, write = 2 and execute = 1. An optional fourth leading digit represents the special bits: setuid = 4, setgid = 2 and sticky = 1, for example 4755 or 1777. In symbolic notation, the special bits replace the x with s/S (setuid and setgid) or t/T (sticky), lowercase if execute is set. 3 or 4 octal digits are accepted, as well as 9-character strings or 10-character ones with the leading type, as shown by ls -l. The chmod command is generated in octal and letter notation, with the -R option to apply it recursively.
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute (7) and the group and others can read and execute (5). It's the usual setting for folders and scripts: rwxr-xr-x.
What does chmod 644 mean?
The owner can read and write (6) and everyone else can only read (4): rw-r--r--. It's the typical permission for regular files, such as web pages.
Why is chmod 777 not recommended?
Because it gives write permission to every user on the system, which is a security risk. Use the minimum permission needed.
What is the sticky bit?
A special bit that, on a folder, prevents users from deleting other users' files. It's what /tmp has, with permissions 1777.
What permissions should a private SSH key have?
600 (rw-------): only the owner can read and write it. SSH rejects keys with more open permissions.
Related tools
- Cron expressions · Explanation and next runs
- Number bases · Binary, octal, decimal, hexadecimal and more
- Strong passwords · With a strength meter
- Hash generator · MD5 and SHA for text or files
- Regex tester · Highlighted matches and groups
- Base64, URL and HTML · Encode and decode in all three formats