dpns_chown man page
DPNS_CHOWN(3) DPNS Library Functions DPNS_CHOWN(3)
dpns_chown - change owner and group of a DPNS directory/file in the
[1mint dpns_chown (const char *[4m[22mpath[24m[1m, uid_t [4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
[1mint dpns_lchown (const char *[4m[22mpath[24m[1m, uid_t [4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
[1mdpns_chown [22msets the owner and the group of a DPNS directory/file in the
name server to the numeric values in [4mowner[24m and [4mgroup[24m respectively. If
[4mowner[24m or [4mgroup[24m is specified as -1, [1mdpns_chown() [22mdoes not change the
corresponding ID of the file.
[1mdpns_lchown [22mis identical to [1mdpns_chown [22mexcept for symbolic links: it
does not follow the link but changes the ownership of the link itself.
[4mpath[24m specifies the logical pathname relative to the current DPNS
directory or the full DPNS pathname.
To change the owner ID, if the group ID does not change and if the
caller and the new owner ID belong to that group, GRP_ADMIN privilege
is needed, otherwise the caller must have ADMIN privilege in the Cupv
database. To change the group ID, the effective user ID of the process
must match the owner ID of the file and the new group must be in the
list of groups the caller belong to or the caller must have ADMIN priv-
ilege in the Cupv database.
This routine returns 0 if the operation was successful or -1 if the
operation failed. In the latter case, [1mserrno [22mis set appropriately.
[1mEPERM [22mThe effective user ID does not match the owner of the file
and the caller does not have ADMIN privilege in the Cupv
[1mENOENT [22mThe named file/directory does not exist or is a null path-
[1mEACCES [22mSearch permission is denied on a component of the [4mpath[0m
[1mEFAULT [4m[22mpath[24m is a NULL pointer.
[1mENOTDIR [22mA component of [4mpath[24m prefix is not a directory.
[1mEINVAL [4m[22mnew_uid[24m or [4mnew_gid[24m is invalid.
[1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.
[1mSENOSHOST [22mHost unknown.
[1mSENOSSERV [22mService unknown.
[1mSECOMERR [22mCommunication error.
[1mENSNACT [22mName server is not running or is being shutdown.
[1mCastor_limits(4)[22m, [1mdpns_chdir(3)[22m, [1mCupvlist(1)[0m
[1mLCG Grid Deployment [22mTeam
DPNS $Date: 2003/09/02 07:15:00 $ DPNS_CHOWN(3) dpns_lchown(3) is an alias of dpns_chown(3).
dpns_lchown(3) is an alias of dpns_chown(3).