permissions files — coreutils
/binstdin stdout - file -- opt --help --version
chmod (change mode) command sets access permissions for files and directories. Not every file should be available to everyone (this isn’t Windows 95, y’know), and
chmod is the tool for ensuring this. Typical permissions are read, write, and execute, and they may be limited to the file owner, the file’s group owner, and/or other users. The permissions argument can take three different forms:
file, to set the same permissions as another given file
An octal number, up to four digits long, that specifies the file’s absolute permissions in bits. The rightmost digit is special (described later) and the second, third, and fourth represent the file’s owner, the file’s group, and all users. See Figure 1-3 for an example, displaying the meaning of mode 0640.
One or more strings specifying absolute or relative permissions (i.e., relative to the file’s existing permissions) to be applied, separated by commas.
In the third form, each string consists of three parts: an optional scope, a command, and permissions.
- Scope (optional)
ofor other users not in the group,
afor all users. The default is
+to add permissions,
-to remove permissions,
=to set absolute permissions, ignoring existing ones
- Permissions ...