CraftTools

Chmod Calculator

Guide: Linux File Permissions and chmod Explained

Read (4)Write (2)Execute (1)
Owner
Group
Everyone else
chmod 755 filename
  • Owner: read, write, execute
  • Group: read, execute
  • Everyone else: read, execute

Nothing you enter or choose here leaves your device. This tool runs in your browser.

Going in both directions

Tick the boxes and the tool gives you the octal number and the symbolic form. Or work backward: type 640 and the boxes tick themselves, showing rw-r-----, which means the owner can read and write, the group can read, and everyone else gets nothing. That second direction is useful when someone hands you a number and you need to know what it allows.

Modes for common jobs

JobModeSymbolicWhy
Web page or image on a server644rw-r--r--The server reads it, only you edit it
Folder on a web server755rwxr-xr-xEveryone can enter and list, only you can add files
Shell script you run755rwxr-xr-xNeeds the execute bit
Private SSH key600rw-------SSH refuses keys others can read
Private folder700rwx------Only the owner can enter
Config file with a password in it640rw-r-----Owner writes, a service group reads
Shared team folder2775rwxrwsr-xGroup can write, new files inherit the group
Shared temp folder1777rwxrwxrwtEveryone writes, only owners delete their own

Where the default comes from

New files and folders start from a base mode and then lose whatever the umask removes. Files start at 666 and folders at 777. With the usual umask of 022, the write bit is removed for group and others, giving 644 for files and 755 for folders. A stricter umask of 077 gives 600 and 700, so new files are private from the start. If your files keep appearing with the wrong mode, check the umask of the process that creates them.

Reading ls -l

-rw-r--r--  1 ada  staff   2048 Oct 24 09:15 notes.txt
drwxr-xr-x  5 ada  staff    160 Oct 24 09:15 projects
-rwsr-xr-x  1 root wheel  34832 Oct 24 09:15 passwd

The first character is the type: a dash for a file, d for a folder. The next nine are three sets of read, write and execute for owner, group and others. A letter s in place of an x, as in the last line, means setuid is on: the program runs with its owner's rights, which is how a normal user can change their own password. Setuid is represented by a fourth leading digit of 4, so that line is 4755.

Fixing permission errors

  • Permission denied when running a script: add execute for the owner, which is chmod u+x file.
  • A website returns 403: the web server's user can't read the file, or can't enter a parent folder. Each folder on the path needs execute.
  • SSH ignores a key: make the key 600 and the .ssh folder 700.
  • You can list a folder but not open its files: the folder has read but not execute.

Avoid 777. It lets any user on the machine change the file, and it hides the real problem, which is usually a wrong owner. The chmod guide goes through ownership and recursive changes, and the number base converter shows how octal digits map to bits.

Written by Akinrinmade Michael · Updated October 24, 2026

How to use

  1. 1Tick the permissions for owner, group and everyone else.
  2. 2Read the octal value, such as 755, and the symbolic form, such as rwxr-xr-x.
  3. 3Or type an octal or symbolic value to see the boxes change.
  4. 4Click Copy command.

Frequently asked questions

How does the octal number work?

Read is 4, write is 2 and execute is 1. Add them up for each of owner, group and others, so rwx is 7, r-x is 5 and r-- is 4. That gives 755 for rwxr-xr-x.

What permissions should I use?

644 for ordinary files, 755 for folders and programs, 600 for private files such as SSH keys and 700 for private folders. Avoid 777, which lets anyone change the file.

What are setuid, setgid and the sticky bit?

They are special bits shown as a fourth digit. Setuid and setgid run a program with the owner's or group's rights, and the sticky bit on a folder, like /tmp, lets only the owner delete their own files.

What does execute mean on a folder?

It lets you enter the folder and reach the files inside it. Without it you can't open the files even if you can list them.

Read the guides

Learn how this works and how to get the most from it.

Developer

Linux File Permissions and chmod Explained

Understand read, write and execute permissions, what 755 and 644 mean, and how to use chmod with octal and symbolic modes.

4 min read

Developer

Subnet Masks and CIDR Notation Explained

What /24 and 255.255.255.0 mean, how to count hosts in a subnet, and how to split a network into smaller ones.

3 min read

IP Subnet Calculator

Calculate network, host range and masks for an IPv4 or IPv6 CIDR.

Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base to 36.

Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes and HMACs.

URL Parser & Query Builder

Split a URL into its parts and edit its query parameters.