| United States-English |
|
|
|
![]() |
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4
POSIX/iX Library Function Descriptions
chown |
|
Changes the owner and group of a file.
The chown()function changes the user ID (UID) of the specified file to owner and the group ID (GID) of the file to group. In order to change the UID of a file, the user associated with the calling process must be one of the following:
In order to change the GID of a file, the user associated with the calling process must be one of the following:
Upon successful completion, chown() marks for update the st_ctime time field of the file. Refer to the EIMPL and EFAULT error descriptions below. The S_ISUID and S_ISGID bits are not supported. The {_POSIX_CHOWN_RESTRICTED} constant is always in effect for pathname. You cannot modify the GID of the root directory, MPE/iX accounts, or MPE/iX groups. An object's owner, its account manager(s), and system managers have different abilities to assign UID and GID values. A system manager (user with MPE/iX SM capability) can specify any positive UID or GID value defined in the user or group databases. An account manager (user with MPE/iX AM capability) can specify the UID of any user belonging to the account manager's account, but can only specify the GID associated with the account manager's own effective GID. File owners lacking SM or AM capability cannot change a file's UID, but can change a file or directory's GID to their own effective GID. Changing an object's file owner ID (UID) or file group ID (GID) changes access control for that file or directory. File owners of files and directories can also change the access permissions granted to the object. Changing an object's UID or GID also changes the file owner or file group referenced by $OWNER and $GROUP entries in the ACD associated with the file or directory. An ACD is automatically assigned to a file if the file lacks an ACD and the group parameter specifies a different GID than the GID associated with the MPE/iX account in which the file resides. The new ACD grants all access to the file owner and RACD access to all others. If an error occurs, errno is set to one of the following values:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||