Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chgrp(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(1)

chown(2)

group(4)

passwd(4)

acl(5)

CHOWN(1)

NAME

chown, chgrp − change file owner or group

SYNOPSIS

chown owner file ... 

chgrp group file ... 

DESCRIPTION

Chown changes the owner of the files to owner. The owner can be either a decimal user ID or a login name found in the password file.

Chgrp changes the group ID of the files to group. The group can be either a decimal group ID or a group name found in the group file.

In order to change the owner or group, you must own the file or be the super-user.  If either command is invoked by other than the super-user on a regular file, the set-user-ID and set-group-ID bits of the file mode, 04000 and 02000 respectively, will be cleared. 

When using chown or chgrp on symbolic links, the owner or group of the symbolic link is changed. 

Access Control Lists (ACLs)

Users can permit or deny specific individuals and groups to access a file by setting optional ACL entries in the file’s access control list (see acl(5)). When using chown in conjunction with ACLs, if the new owner and/or group of a file does not have an optional ACL entry corresponding to u.% and/or %.g in the file’s access control list, the file’s access permission bits remain unchanged.  However, if the new owner and/or group is already designated by an optional ACL entry of u.% and/or %.g in the file’s ACL, chown sets the corresponding file access permission bits (and the corresponding base ACL entries) to the permissions contained in that entry. 

RETURN VALUE

Exit values are:

 0 Successful completion. 

>0 Error condition occured. 

EXAMPLES

The following command changes the owner of the file jokes to sandi:

chown sandi jokes

To execute this command, you must be either the owner of jokes or the superuser. 

FILES

/etc/group
/etc/passwd

SEE ALSO

chmod(1), chown(2), group(4), passwd(4), acl(5). 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

STANDARDS CONFORMANCE

chown: SVID2, XPG2, XPG3

chgrp: SVID2, XPG2, XPG3

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

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