User (owner)
Group
Others
Octal644
Symbolicrw-r--r--

chmod 644 <file-or-folder>

Read = 4, write = 2, execute = 1 — add them per group and read the three digits in order (user, group, others). 644 is the standard for files you own, 755 for folders and scripts, 600 for secrets like SSH keys. Avoid 777 on anything reachable from the network, and remember directories also need the execute bit before you can enter them.

Reading permissions like a sysadmin

The three digits cover the owner, the group and everyone else, in that order. Each digit is the sum of read (4), write (2) and execute (1), which is why 755 means “owner can do everything, everyone else can read and run” — the standard for folders and scripts. 644 means “owner writes, everyone reads”, the standard for plain files like config and HTML.

Two traps worth knowing: directories need the execute bit before you can enter or traverse them, and if a permission error persists it is often ownership, not mode — chown -R user:group folder fixes that. If you are setting permissions inside Docker, the container's user (PUID/PGID) has to line up with the host, which the volumes guide below walks through.