Chown

The chown command is used on Unix-like systems to change the owner of a file. In most implementations, it can only be executed by the Superuser. Unprivileged (regular) users who wish to change the group of a file that they own may use chgrp.

Usage

The general syntax for the chown command is:
  chown user:group target1 .. 
  • The optional user parameter indicates the new user who should take ownership of the targets.
  • The optional group parameter (which must be prefixed with a colon, :) indicates the group with which the targets should be associated.
  • The target parameters indicate the files or directories for which the user and/or group will be changed.

Footnotes

  • One of either user or group must be specified. The chown command will not execute properly without at least one of those parameters.
  • The user and group parameters can be either symbolic names or identifiers (i.e. a User ID or Group ID).

Usage examples

  # chown root /var/run/httpd.pid 
  • Change the owner of /var/run/httpd.pid to 'root' (the standard name for the Superuser).
  # chown nobody:nobody /tmp /var/tmp 
  • Change the owner of /tmp and /var/tmp to 'nobody' (the standard name for Nobody).
  • Changes the group associated with the same targets to 'nobody' (the standard group corresponding to Nobody).
  # chown :512 /home 
  • Change the group identifier of /home to 512 (regardless of whether a group name is associated with the identifier 512 or not).

See also

External links

 

<< PreviousWord BrowserNext >>
hunters & collectors
tank locomotive
maternal mortality ratio
list of mexican companies
interstate 691
geoffrey de clinton
porphyria's lover
maurice couve de murville
coloman of hungary
reusability
roach bait
multimethodology
bbc third programme
german communist party
lagersttten
le charme discret de la bourgeoisie
rampart
alfred p. murrah federal building
brazier
kohlberg
southern baptists of texas
list of dialects of the english language
mary had a little lamb
triple buffering
spade
tangerine computer systems
axiom of countability
culture of swaziland
nemanjic
association (object oriented programming)
umhlanga
graduate school
gre
all things considered
saint danilo ii
toyota prius
tbe
jumpstart 3rd grade
list of television stations in rhode island
gustavo daz ordaz
american airlines flight 63
whip poor will
bookfinder.com
black billed cuckoo