Information AboutChmod |
| CATEGORIES ABOUT CHMOD | |
| unix software | |
| standard unix programs | |
|
The chmod command (abbreviated from change '''mod'''e) is a Shell command in Unix-like environments. When executed, the command can change file system modes of Files and Directories . The modes include Permissions and special modes. HISTORY A chmod command first appeared in AT&T UNIX version 1, and is still used today on UNIX-like machines. USAGE The chmod command options are specified like this: $ chmod {Link without Title} ''mode'' ''file1'' ... To view what the permissions currently are type: $ ls -l Options The chmod command has a number of command line options that affect its behavior. The most common options are:
String modes To the chmod utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text: classes The classes are used to distinguish the users to whom the permissions apply. They are represented by one or more of the following letters:
The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:
Finally, the chmod program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:
The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas. For example, the following command would be used to add the read and write permissions to the user and group classes of a file or directory named sample: $ chmod {Link without Title} ug+rw sample Octal numbers The chmod command also accepts three- and four-digit octal numbers representing modes. See the article mentioned above for more information about octal notation. An example of the chmod command using a four-digit octal number to set the modes of a file or directory named sample: $ chmod {Link without Title} 0664 sample Special modes See also: Additional File System Permissions The chmod command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use s to represent the '' Setuid '' and '' Setgid '' modes, and t to represent the '' Sticky '' mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified. Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used. EXAMPLES
SEE ALSO
EXTERNAL LINKS
|
|
|