chmod Command Examples

Change the access permissions of a file or directory. More information: https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html.

chmod u+x {{path/to/file}}

chmod u+rw {{path/to/file_or_directory}}

chmod g-x {{path/to/file}}

chmod a+rx {{path/to/file}}

chmod o=g {{path/to/file}}

chmod o= {{path/to/file}}

chmod -R g+w,o+w {{path/to/directory}}

chmod -R a+rX {{path/to/directory}}