lfc_chown man page
LFC_CHOWN(3) LFC Library Functions LFC_CHOWN(3)
lfc_chown - change owner and group of a LFC directory/file in the name
[1mint lfc_chown (const char *[4m[22mpath[24m[1m, uid_t [4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
[1mint lfc_lchown (const char *[4m[22mpath[24m[1m, uid_t [4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
[1mlfc_chown [22msets the owner and the group of a LFC 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, [1mlfc_chown() [22mdoes not change the cor-
responding ID of the file.
[1mlfc_lchown [22mis identical to [1mlfc_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 LFC
directory or the full LFC 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, [1mlfc_chdir(3)[22m, [1mCupvlist(1)[0m
[1mLCG Grid Deployment [22mTeam
LFC $Date: 2003/09/02 07:15:00 $ LFC_CHOWN(3) lfc_lchown(3) is an alias of lfc_chown(3).
lfc_lchown(3) is an alias of lfc_chown(3).