
Fatmawati Achmad Zaenuri/Shutterstock.com
Chmod takes three main arguments: r, w, and x, which stand for read, write, and execute, respectively. Adding or removing combinations of the arguments controls file and folder permissions. For example, chmod +rwx adds permission to read, write, and execute scripts. Running chmod -wx removes the ability to write and execute.
Control who can access files, search directories, and run scripts using the Linux’s chmod command. This command modifies Linux file permissions, which look complicated at first glance but are actually pretty simple once you know how they work.
chmod Modifies File Permissions
In Linux, who can do what to a file or directory is controlled through sets of permissions. There are three sets of permissions. One set for the owner of the file, another set for the members of the file’s group, and a final set for everyone else.
The permissions control the actions that can be performed on the file or directory. They either permit, or prevent, a file from being read, modified or, if it is a script or program, executed. For a directory, the permissions govern who can cd into the directory and who…
Read Full Article Source