Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chown(8) — Ultrix/UWS 4.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chgrp(1)

chown(2)

group(5)

group(5yp)

passwd(5)

passwd(5yp)

chown(8)

Name

chown − change owner and, optionally, group

Syntax

/etc/chown [ −fR ] owner[.group]file...

Description

The chown command changes the owner and, optionally, group for one or more files and directories.  The value for file can be a full or partial path.  The value for owner can be either a decimal UID or a login name found in the password file.  The value for group can be either a decimal GID or a group name found in the group file. 

The user invoking chown must be either the superuser or the owner of all specified files and, if group is specified, must belong to the specified group. 

Options

−fInhibits display of errors that are returned when chown cannot change the owner or group of the specified files.

−RCauses chown to recursively descend any directories subordinate to file and to set the owner, group, or both for each file encountered.  When symbolic links are encountered, chown changes the owner and group for the link file itself but does not traverse the path associated with the link.  The -R option is useful only when file is a directory that is not empty. 

Examples

Change the owner of myfile to ecbell:

/etc/chown ecbell myfile

Change the owner of myfile to craig and group of myfile to admin:

/etc/chown craig.admin myfile

Change the owner to richart and group to eng for the directories projecta and projectb and for all files and directories on any levels subordinate to projecta and projectb:

/etc/chown -R richart.eng projecta projectb

Files

/etc/passwd

/etc/group

/etc/yp/src/passwd

/etc/yp/src/group

See Also

chgrp(1), chown(2), group(5), group(5yp), passwd(5), passwd(5yp)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026