chown(1)


NAME

   chown - change file owner and group

SYNOPSIS

   chown [OPTION]... [OWNER][:[GROUP]] FILE...
   chown [OPTION]... --reference=RFILE FILE...

DESCRIPTION

   This manual page documents the GNU version of chown.  chown changes the
   user and/or group ownership of each given file.  If only  an  owner  (a
   user  name or numeric user ID) is given, that user is made the owner of
   each given file, and the files' group is not changed.  If the owner  is
   followed  by  a  colon  and a group name (or numeric group ID), with no
   spaces between them, the group ownership of the  files  is  changed  as
   well.  If a colon but no group name follows the user name, that user is
   made the owner of the files and the group of the files  is  changed  to
   that  user's  login  group.   If the colon and group are given, but the
   owner is omitted, only the group of the files is changed; in this case,
   chown  performs  the same function as chgrp.  If only a colon is given,
   or if the entire operand is empty, neither the owner nor the  group  is
   changed.

OPTIONS

   Change the owner and/or group of each FILE to OWNER and/or GROUP.  With
   --reference, change the owner and group of each FILE to those of RFILE.

   -c, --changes
          like verbose but report only when a change is made

   -f, --silent, --quiet
          suppress most error messages

   -v, --verbose
          output a diagnostic for every file processed

   --dereference
          affect the referent of each symbolic link (this is the default),
          rather than the symbolic link itself

   -h, --no-dereference
          affect  symbolic  links  instead  of any referenced file (useful
          only on systems that can change the ownership of a symlink)

   --from=CURRENT_OWNER:CURRENT_GROUP
          change the owner and/or group of each file only if  its  current
          owner  and/or  group  match those specified here.  Either may be
          omitted, in which case a match is not required for  the  omitted
          attribute

   --no-preserve-root
          do not treat '/' specially (the default)

   --preserve-root
          fail to operate recursively on '/'

   --reference=RFILE
          use  RFILE's  owner and group rather than specifying OWNER:GROUP
          values

   -R, --recursive
          operate on files and directories recursively

   The following options modify how a hierarchy is traversed when  the  -R
   option  is  also  specified.   If  more than one is specified, only the
   final one takes effect.

   -H     if a command line argument is a symbolic link  to  a  directory,
          traverse it

   -L     traverse every symbolic link to a directory encountered

   -P     do not traverse any symbolic links (default)

   --help display this help and exit

   --version
          output version information and exit

   Owner  is  unchanged  if  missing.   Group is unchanged if missing, but
   changed to login group if implied by a ':' following a symbolic  OWNER.
   OWNER and GROUP may be numeric as well as symbolic.

EXAMPLES

   chown root /u
          Change the owner of /u to "root".

   chown root:staff /u
          Likewise, but also change its group to "staff".

   chown -hR root /u
          Change the owner of /u and subfiles to "root".

AUTHOR

   Written by David MacKenzie and Jim Meyering.

REPORTING BUGS

   GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
   Report chown translation bugs to <http://translationproject.org/team/>

COPYRIGHT

   Copyright    2016  Free Software Foundation, Inc.  License GPLv3+: GNU
   GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
   This is free software: you are free  to  change  and  redistribute  it.
   There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

   chown(2)

   Full documentation at: <http://www.gnu.org/software/coreutils/chown>
   or available locally via: info '(coreutils) chown invocation'


More Linux Commands

manpages/wcsncasecmp.3.html
wcsncasecmp(3) - compare two fixed-size wide-character strin
The wcsncasecmp() function is the wide-character equivalent of the strncasecmp(3) function. It compares the wide-character string pointed to by s1 and the wide-

manpages/getline.3.html
getline(3) - delimited string input - Linux manual page.....
getline() reads an entire line from stream, storing the address of the buffer containing the text into *lineptr. The buffer is null-terminated and includes the

manpages/gnutls_x509_privkey_import_dsa_raw.3.html
gnutls_x509_privkey_import_dsa_raw(3) - API function........
This function will convert the given DSA raw parameters to the native gnutls_x509_privkey_t format. The output will be stored in key. RETURNS On success, GNUTLS

manpages/intel_bios_dumper.1.html
intel_bios_dumper(1) - Saves the Intel video BIOS contents t
intel_bios_dumper is a tool to save the contents of the Intel video BIOS to a file. It can then be parsed offline for debugging issues with the video bios table

manpages/XUndefineCursor.3.html
XUndefineCursor(3) - define cursors - Linux manual page.....
If a cursor is set, it will be used when the pointer is in the window. If the cursor is None, it is equivalent to XUndefineCursor. XDefineCursor can generate Ba

manpages/makeinfo.1.html
makeinfo(1) - translate Texinfo documents - Linux man page
Translate Texinfo source documentation to various other formats, by default Info files suitable for reading online with Emacs or standalone GNU Info. General op

manpages/systemd.1.html
systemd(1) - systemd System and Service Manager (Man Page)
systemd is a system and service manager for Linux operating systems. When run as first process on boot (as PID 1), it acts as init system that brings up and mai

manpages/gluBeginCurve.3gl.html
gluBeginCurve(3gl) - delimit a NURBS curve definition.......
Use gluBeginCurve to mark the beginning of a NURBS curve definition. After calling gluBeginCurve, make one or more calls to gluNurbsCurve to define the attribut

manpages/ber_put_string.3.html
ber_put_string(3) - OpenLDAP LBER simplified Basic Encoding
These routines provide a subroutine interface to a simplified implementation of the Basic Encoding Rules of ASN.1. The version of BER these routines support is

manpages/glGetTexParameter.3gl.html
glGetTexParameter(3gl) - return texture parameter values....
glGetTexParameter returns in params the value or values of the texture parameter specified as pname. target defines the target texture, either GL_TEXTURE_1D, GL

manpages/move_panel.3curses.html
move_panel(3curses) - panel stack extension for curses......
Panels are ncurses(3NCURSES) windows with the added feature of depth. Panel functions allow the use of stacked windows and ensure the proper portions of each wi

manpages/gnutls_anon_allocate_client_credentials.3.html
gnutls_anon_allocate_client_credentials(3) - API function...
gnutls_anon_allocate_client_credentials.3 - This structure is complex enough to manipulate directly thus this helper function is provided in order to allocate i





We can't live, work or learn in freedom unless the software we use is free.