Change file and directory permissions quickly using octal or symbolic notation. 15.11.2025 | reading time: 2 min Want to stop users from reading a file or allow only the admin to execute a script? `chmod` changes the permission bits that control who can read, write or execute files and directories, and this short guide takes you from a simple example to useful options. Hands-On Example Create a test file, inspect permissions, then change them with both octal and symbolic forms to see the effect. ```bash $ touch secret.txt $ ls -l secret.txt -rw-r--r-- 1 alice dev 0 Sep 01 12:00 secret.txt $ chmod 600 secret.txt # octal: owner read/write only $ ls -l secret.txt -rw------- 1 alice dev 0 Sep 01 12:00 secret.txt $ chmod u=rwx,g=rx,o= secret.txt # symbolic: owner rwx, group rx, others none $ ls -l secret.txt -rwxr-x--- 1 alice dev 0 Sep 01 12:00 secret.txt ``` More Ways to Use chmod Use `chmod -R` to change permissions recursively on directories, pick octal values like 750 for compact changes, or toggle special bits with modes such as 4755 for setuid, `g+s` for setgid and `+t` for the sticky bit; these options let the operator control execution, inheritance and who may remove files in shared folders. Related Utilities Permissions are one piece of the puzzle, so combine `chmod` with `chown` to change ownership, use `stat` to view detailed mode bits, and reach for `setfacl` and `getfacl` when you need finer access control than the basic permission model provides. Next Steps Practice changing permissions on real directories and scripts until the meaning of each bit is automatic, then explore access control lists and special bits for shared services; consider formalizing skills with certifications like CompTIA Linux+ or LPIC-1, with bitsandbytes.academy being an intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities security scripting