What does chmod 755 mean? Directory and script permissions explained
By TechCompare · Updated · How we check
chmod 755 means rwxr-xr-x: the owner gets full access, while the group and others can read and execute. Use it for directories and executable scripts, and 644 for plain files.
chmod 755 sets permissions to rwxr-xr-x: the owner can read, write, and execute, while the group and everyone else can read and execute but not modify. This is a common baseline for directories and executable scripts on Unix-like systems, and for good reason: it lets the owner manage files while letting everyone else use them without write access.
How this is calculated
In octal, 7 = 4+2+1 (read+write+execute) and 5 = 4+0+1 (read+execute). The three digits apply to owner, group, and others in that order. 755 is a common baseline because it prevents other users from modifying the file while still letting them read it or, for a directory, search and enter it. For web servers, 755 on directories and 644 on files is a common deployment baseline. Never use 777 unless you have a very specific reason and understand its world-write implications.
Verdict
Use 755 for directories and executable scripts: the owner manages, everyone else can navigate or run. The octal math breaks down to 7 for the owner and 5 for group and others.
On a directory, the execute bit means 'permission to enter and look up files inside', which is why stripped-down 644 directories leave users unable to even cd into them.
On web-server document roots the usual pairing is 755 for directories and 644 for the files inside. When a deploy user owns the files, the web-server user (www-data, nginx) lands in the 'others' bucket, so it can read and serve without ever being able to write.
More CHMOD scenarios
Related guides
Frequently asked questions
When should I use chmod 755 vs 644?
How do I set 755 permissions recursively on a directory?
chmod -R 755 /path/to/dir. The -R flag applies the change to the directory and everything inside it. Be careful with recursive chmod: it sets the same mode on every file, including private keys and binaries that need different permissions. Use find /path -type d -exec chmod 755 {} + for directories only.Is chmod 755 the right permission for a public web directory like /var/www/html?
Related tools
Subnet Calculator
Calculate network address, broadcast address, and usable IP ranges for IPv4/IPv6.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolUnix Timestamp
Convert between Unix timestamps and human-readable dates.
Use tool