chmod
chmod is a Linux command in the Permissions category, rated intermediate difficulty. Changes file permissions (read, write, execute) for owner/group/others. The syntax is chmod [options] mode file. Key options and parameters: mode, file — permission mode, target file. It returns none (permissions changed). A practical example: chmod 755 script.sh # rwxr-xr-x chmod +x script.sh # Add execute permission chmod -R 644 dir/ # Recursive (files only) chmod u=rw,g=r,o=r file # Symbolic mode A close relative is chown, which changes file owner and/or group ownership. A close relative is chgrp, which changes group ownership of files and directories. A close relative is umask, which sets the default permission mask for newly created files and directories. More about this category: Linux permission commands — chmod, chown, chgrp, umask, and more. Manage file permissions and ownership. Related Permissions commands: chown, chgrp, umask, sudo, su, getfacl, setfacl, chattr.