CHOWN(1) General Commands Manual CHOWN(1)

chown, chgrpChange files ownership

chown [-v] [-h | -R [-HLP]] owner[:group] file...

chgrp [-v] [-h | -R [-HLP]] group file...

chown sets the user ID given by owner, and when given by group, the group ID on each given file.

chgrp sets the group ID given by group on each given file.

The owner and group arguments can be either numeric IDs, or names. Ownership refers to both user and group.

If file is a symbolic link, set it's ownership.
If -R is also specified, and file refers to a symbolic link itself referring to a directory, change ownership of the directory and it's children.
If -R is also specified, and symbolic links referring to directories are found, change ownership of said directories and their children.
If -R is also specified, change ownership of symbolic links without dereferencing.
Recurse into directories.
Verbose, print a message about each processed file, whether a change was made or not.

The chown utility exits 0 on success, and >0 if an error occurs.

stat(1)

chown should be compliant with the IEEE Std 1003.1-2024 (“POSIX.1”) specification.

The -v option is an extension, also present in GNU coreutils.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

2024-04-27 Linux 6.6.67-gentoo-x86_64