chown.1 (1676B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2024-04-27
- .Dt CHOWN 1
- .Os
- .Sh NAME
- .Nm chown , chgrp
- .Nd Change files ownership
- .Sh SYNOPSIS
- .Nm chown
- .Op Fl v
- .Op Fl h | Fl R Op Fl HLP
- .Ar owner Ns Op : Ns Ar group
- .Ar file...
- .Nm chgrp
- .Op Fl v
- .Op Fl h | Fl R Op Fl HLP
- .Ar group
- .Ar file...
- .Sh DESCRIPTION
- .Nm chown
- sets the user ID given by
- .Ar owner ,
- and when given by
- .Ar group ,
- the group ID on each given
- .Ar file .
- .Pp
- .Nm chgrp
- sets the group ID given by
- .Ar group
- on each given
- .Ar file .
- .Pp
- The
- .Ar owner
- and
- .Ar group
- arguments can be either numeric IDs, or names.
- Ownership refers to both user and group.
- .Sh OPTIONS
- .Bl -tag -width Ds
- .It Fl h
- If
- .Ar file
- is a symbolic link, set it's ownership.
- .It Fl H
- If
- .Fl R
- is also specified,
- and
- .Ar file
- refers to a symbolic link itself referring to a directory,
- change ownership of the directory and it's children.
- .It Fl L
- If
- .Fl R
- is also specified,
- and symbolic links referring to directories are found,
- change ownership of said directories and their children.
- .It Fl P
- If
- .Fl R
- is also specified,
- change ownership of symbolic links without dereferencing.
- .It Fl R
- Recurse into directories.
- .It Fl v
- Verbose, print a message about each processed file, whether a change was made or not.
- .El
- .Sh EXIT STATUS
- .Ex -std
- .Sh SEE ALSO
- .Xr stat 1
- .Sh STANDARDS
- .Nm
- should be compliant with the
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- .Pp
- The
- .Fl v
- option is an extension, also present in GNU coreutils.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me