Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
User Commands (c) chown(1)
membership in the Safeguard SECURITY-OSS-ADMINISTRATOR group can use the chown
command to change the owner of a file.
Only a process that has an effective user ID equal to the super ID or to the file owner, or that has
an effective user ID or group affiliation qualifying for membership in the Safeguard
SECURITY-OSS-ADMINISTRATOR group can use the chown command to change the group
of a file. However, processes that have an effective user ID equal to the file owner can only
change the group of a file to a group to which they belong (their effective group or one of their
supplementary groups).
If the chown command is invoked by a process whose effective user ID does not equal the super
ID, the set-user-ID and set-group-ID bits of the file mode (04000 and 02000, respectively) are
cleared.
Access Control Lists (ACLs)
A user can use the ACL for a file to allow or deny specific individuals and groups access to a file.
When you use the chown() function with ACLs, if the new owner and/or group of a file have
optional ACL entries corresponding to user:uid:perm or group:gid:perm in the ACL for a file,
those entries remain in the ACL but no longer have any effect because they are superseded by the
user::perm or group::perm entries in the ACL.
ACLs are not supported for symbolic links.
For more information about ACLs, see the acl(5) reference page.
Environment Variables
The following environment variables affect the execution of the chown command:
UTILSGE Specifies that HP extensions to the root directory should be omitted
when the initial directory is root and a recursive operation occurs in an
OSS shell command. Application programs that test this variable
might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable
is the same as specifying the -W NOG or -W NOE flag in the com-
mand.
EXAMPLES
1. To change the owner of the file program.c,tosteffan enter:
chown steffan program.c
The user access permissions for program.c now apply to steffan. As the
owner, steffan can use the chmod command to permit or deny the other users
access to program.c. (See the chmod(1) reference page for details.)
2. To recursively change the owner of all OSS files on the local node to the user-
name GROUP1.USER1 without affecting local Guardian files, enter:
chown -W NOG -W NOE -R GROUP1.USER1 /
or
527188-021 Hewlett-Packard Company 2−79