' , short for change own'er, is a shell command for changing the owning user of Unix-based file system files including special files such as directories.
via Wikipedia infobox
chown
pubs.opengroup.org →The chown utility shall set the user ID of the file named by each file operand to the user ID specified by the owner operand. For each file operand, or, if the -R option is used, each file encountered while walking the directory trees specified by the file operands, the chown utility shall perform actions equivalent to the chown () function defined in the System Interfaces volume of POSIX.1-2017, called with the following arguments: Unless chown is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a regular file shall be cleared upon successful completion; the set-user-ID and set-group-ID bits of other file types may be cleared. For each file operand that names a file of type symbolic link, chown shall attempt to set the user ID of the symbolic link. If a group ID was specified, for each file operand that names a file of type symbolic link, chown shall attempt to set the group ID of the symbolic link. 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]]( Some implementations restrict the use of chown to a user with appropriate privileges. The System V and BSD versions use different exit status codes. Some implementations used the exit status as a count of the number of errors that occurred; this practice is unworkable since it can overflow the range of valid exit status values. These are masked by specifying only 0 and 0 as exit values. The 4.3 BSD method of specifying both owner and group was included in this volume of POSIX.1-2017 because: There are cases where the desired end condition could not be achieved using the chgrp and chown (that only changed the user ID) utilities. (If the current owner is not a member of the desired group and the desired owner is not a member of the current group, the chown () function could fail unless both owner and group are changed at the same time.) Even if they could be changed independently, in cases where both are being changed, there is a 100% performance penalty caused by being forced to invoke both utilities. The normative text is reworded to avoid use of the term "must" for application requirements. IEEE PASC Interpretation 1003.2 172 is applied, changing the CONSEQUENCES OF ERRORS section to "Default.". SD5-XCU-ERN-9 is applied, removing the -R from the first line of the SYNOPSIS.
~1 min read
' , short for change own'er, is a shell command for changing the owning user of Unix-based file system files including special files such as directories.
The ownership of a file may only be altered by a super-user (such as via sudo). A regular user cannot give away their ownership of a file.
Excerpt from a page describing this subject · 12,011 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).