Open System Services System Calls Reference Manual (G06.28+, H06.05+)

chown(2) OSS System Calls Reference Manual
Access Control Lists (ACLs)
A user can allow or deny specic individuals and groups access to a le by using an ACL on the |
le. When using the chown() function with ACLs, if the new owner and/or group of a le have |
optional ACL entries corresponding to user:uid:perm or group:gid:perm in the ACL for a le, |
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.
Use on Guardian Objects
The chown() function can be used on Guardian disk les (that is, disk les in the /G le system).
Attempts to change the ownership of other types of Guardian les fail and set errno to [EIN-
VAL].
For Guardian disk les, Guardian security is used, and any user can pass le ownership to any
other user. A value other than -1 must be specied for the owner parameter (that is, an owner ID
must be specied). However, changing the owner ID also changes the group ID to the Guardian
group ID of the new owner (that is, bits <16:23> of the new access ID). The chown() function
cannot be used to set the group ID for a Guardian le except as a result of changing the owner
ID.
The _POSIX_CHOWN_RESTRICTED feature is ignored for les in the Guardian le system
(that is, for les in /G).
Use From the Guardian Environment
The chown() function is one of a set of functions that have these effects when the rst of them is
called from the Guardian environment:
Two Guardian le system le numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These le numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
The use of static memory by the process increases slightly.
These effects occur only when the rst of the set of functions is called. The effects are not cumu-
lative.
RETURN VALUES
Upon successful completion, the chown() function returns the value 0 (zero). Otherwise, the
value -1 is returned, the owner and group of the le remain unchanged, and errno is set to indi-
cate the error.
ERRORS
If any of these conditions occur, the chown() function sets errno to the corresponding value:
[EACCES] Search permission is denied on a component of the path parameter.
[EFAULT] The path parameter is an invalid address.
[EFSBAD] The leset catalog for one of the lesets involved in the operation is corrupt.
126 Hewlett-Packard Company 527186-007