Linux permission calculator

Turn rwx flags into safe chmod commands before a deploy breaks because one file is too open, too private, or not executable.

Octal code
Examples: 755, 644
Symbolic mode
-rwxr-xr-x
chmod 755 filename
Owner
Group
Public

How Linux permissions work

4
Read (r)
Allows viewing a file. On a directory, read allows listing names when execute permission is also available.
2
Write (w)
Allows editing a file. On a directory, write controls creating, renaming, and deleting entries when execute permission is also available.
1
Execute (x)
Allows running a file as a program or entering a directory to reach files inside it.
Permission groups
Owner
The user who owns the file or directory.
Group
Users in the file's assigned group.
Public
Everyone else outside the owner and group.

Frequently asked questions

What does chmod 777 mean?

chmod 777 grants read, write, and execute permissions to everyone. It is extremely permissive and is usually unsafe for production systems unless you understand the security tradeoff.

What permissions should website files usually use?

A common baseline is 755 for directories, 644 for regular files, and 600 for sensitive config files that should only be readable by the owner.

Why does a directory need execute permission?

Directory execute permission means traversal. Without it, a user may not be able to access files inside the directory even if the file itself has read permission.

Should uploads ever be executable?

Usually no. User-uploaded files should generally be stored without execute permission, and sensitive upload paths should be isolated from code execution.