Learn how to control who can read write or execute files using chmod and practical examples. 28.02.2026 | reading time: 2 min Files and directories on Linux are protected by permission bits and `chmod` is the command that changes them; learn how one short command controls access for owner group and others. Change a script to be executable A developer has a script that is not executable and must be run by the owner; check current state then add the execute bit and verify the change with these commands in one line using a code fence for clarity ```$ ls -l script.sh; -rw-r--r-- 1 dev dev 123 Jan 01 12:00 script.sh; $ chmod u+x script.sh; $ ls -l script.sh; -rwxr--r-- 1 dev dev 123 Jan 01 12:00 script.sh``` and equivalently with numeric mode use `chmod 750` for tighter directory access. When numbers and letters both help Use symbolic mode like `chmod u=rw,g=r,o=` for clear intent and numeric mode like `chmod 640` for compact scripts; remember execute bit on directories means permission to traverse so `chmod +x` on a directory enables entering it; advanced bits exist too for special needs setuid setgid and the sticky bit each change runtime or deletion rules for files or subfiles. Check and refine permissions Inspect permissions with `ls -l` and `stat` or view ACLs with `getfacl` and change ownership with `chown`; combine `umask` during file creation to set sensible defaults and use `setfacl` when you need fine grained access beyond the traditional nine bits. Wrap up and next steps Mastering `chmod` unlocks practical control over file access and system safety so practice on a sandbox and explore setuid setgid and ACLs next; deepen skills by studying system administration topics and consider certifications like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy to accelerate progress. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem security utilities scripting