Skip to content
EntityQ310986· pop 35· linked from 384 articles

' is a shell command for changing access permissions and special mode flags of files (including special files such as directories). The name is short for change mod'e where mode refers to the permissions and flags collectively.

Key facts

Software.name
chmod
Software.caption
Example usage of command to change the specified file's permissions
Software.author
AT&T Bell Laboratories
Software.developer
Various open-source and commercial developers
Software.programming language
Plan 9: C
Software.operating system
Unix, Unix-like, Plan 9, Inferno, IBM i
Software.platform
Cross-platform
Software.genre
Command
Software.license
coreutils: GPLv3Plan 9: MIT License

via Wikipedia infobox

Described at

The chmod utility shall change any or all of the file mode bits of the file named by each file operand in the way specified by the mode operand. It is implementation-defined whether and how the chmod utility affects any alternate or additional file access control mechanism (see XBD File Access Permissions ) being used for the specified file. Upon successfully changing the file mode bits of a file, the chmod utility shall mark for update the last file status change timestamp of the file. Recursively change file mode bits. For each file operand that names a directory, chmod shall change the file mode bits of the directory and all files in the file hierarchy below it. Represents the change to be made to the file mode bits of each file named by one of the file operands; see the EXTENDED DESCRIPTION section. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( The mode operand shall be either a symbolic mode expression or a non-negative octal integer. The symbolic mode form is described by the grammar later in this section. The permcopy symbols u , g , and o shall represent the current permissions associated with the user, group, and other parts of the file mode bits, respectively. For the remainder of this section, perm refers to the non-terminals perm and permcopy in the grammar. If multiple actionlist s are grouped with a single wholist in the grammar, each actionlist shall be applied in the order specified with that wholist . The op symbols shall represent the operation performed, as follows: If perm is not specified, the '+' operation shall not change the file mode bits. If who is not specified, the file mode bits represented by perm for the owner, group, and other permissions, except for those with corresponding bits in the file mode creation mask of the invoking process, shall be set. Otherwise, the file mode bits represented by the specified who and perm values shall be set. If perm is not specified, the '-' operation shall not change the file mode bits. If who is not specified, the file mode bits represented by perm for the owner, group, and other permissions, except for those with corresponding bits in the file mode creation mask of the invoking process, shall be cleared. Otherwise, the file mode bits represented by the specified who and perm values shall be cleared. If who is not specified, the file mode bits represented by perm for the owner, group, and other permissions, except for those with corresponding bits in the file mode creation mask of the invoking process, shall be set. Otherwise, the file mode bits represented by the specified who and perm values shall be set. Requests to set the set-user-ID-on-execution or set-group-ID-on-execution bit when all execute bits are currently clear and none are being set are ignored. Requests to clear all execute bits also clear the set-user-ID-on-execution and set-group-ID-on-execution bits. When using the symbolic mode form on other file types, it is implementation-defined whether or not requests to set or clear the set-user-ID-on-execution or set-group-ID-on-execution bits are honored. For an octal integer mode operand, the file mode bits shall be set absolutely. For each bit set in the octal number, the corresponding file permission bit shown in the following table shall be set; all other file permission bits shall be cleared. For regular files, for each bit set in the octal number corresponding to the set-user-ID-on-execution or th

Excerpt from a page describing this subject · 21,518 chars · not written by Vinony

Wikidata facts

Image
Chmod-GNU.png
Show 4 more facts
has command line option
R
inception
1971-11-03
Commons category
Chmod
Sources (3)

via Wikidata · CC0

~9 min read

Article

9 sections
Contents
  • Use
  • Options
  • Octal notation
  • Symbolic notation
  • Examples
  • See also
  • Notes
  • References
  • External links

' is a shell command for changing access permissions and special mode flags of files (including special files such as directories). The name is short for change mod'e where mode refers to the permissions and flags collectively.

The command originated in AT&T Unix version 1 and was exclusive to Unix and Unix-like operating systems until it was ported to other operating systems such as Windows (in UnxUtils) and IBM i.

Connections

Categories