1LFC_CHOWN(3)                      LFC      Library      Functions
2LFC_CHOWN(3)
3
4
5
6[1mNAME[0m
7       lfc_chown  ‐ change owner and  group  of  a  LFC  directo‐
8ry/file in the name
9       server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "lfc_api.h"[0m
14
15       [1mint  lfc_chown  (const  char *[4m[22mpath[24m[1m, uid_t
16[4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
17
18       [1mint lfc_lchown (const char  *[4m[22mpath[24m[1m,  uid_t
19[4m[22mnew_uid[24m[1m, gid_t [4m[22mnew_gid[24m[1m)[0m
20
21[1mDESCRIPTION[0m
22       [1mlfc_chown [22msets the owner and the group of a LFC di‐
23rectory/file  in  the
24       name  server to the numeric  values  in  [4mowner[24m  and
25[4mgroup[24m respectively.  If
26       [4mowner[24m   or   [4mgroup[24m   is   specified  as  ‐1,
27[1mlfc_chown() [22mdoes not change the cor‐
28       responding ID of the file.
29
30       [1mlfc_lchown [22mis identical to [1mlfc_chown  [22mexcept
31for symbolic links: it does
32       not  follow the link but changes the ownership of the link
33itself.
34
35       [4mpath[24m   specifies the  logical   pathname   relative
36to  the  current  LFC
37              directory or the full LFC pathname.
38
39       To   change   the   owner   ID,   if the group ID does not
40change and if the
41       caller and the new owner ID belong to that group,  GRP_AD‐
42MIN  privilege
43       is   needed,   otherwise the caller must have ADMIN privi‐
44lege in the Cupv
45       database.  To change the group ID, the effective  user  ID
46of the process
47       must   match   the  owner ID of the file and the new group
48must be in the
49       list of groups the caller belong to  or  the  caller  must
50have ADMIN priv‐
51       ilege in the Cupv database.
52
53[1mRETURN VALUE[0m
54       This  routine  returns  0  if the operation was successful
55or ‐1 if the
56       operation failed. In the latter case, [1mserrno [22mis set
57appropriately.
58
59[1mERRORS[0m
60       [1mEPERM         [22mThe  effective user ID does not match
61the owner of the file
62                    and  the  caller does not have  ADMIN  privi‐
63lege in the Cupv
64                    database.
65
66       [1mENOENT        [22mThe named file/directory does not ex‐
67ist or is a null path‐
68                    name.
69
70       [1mEACCES       [22mSearch  permission  is  denied   on  a
71component of the [4mpath[0m
72                    prefix.
73
74       [1mEFAULT       [4m[22mpath[24m is a NULL pointer.
75
76       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
77not a directory.
78
79       [1mEINVAL       [4m[22mnew_uid[24m  or  [4mnew_gid[24m  is
80invalid.
81
82       [1mENAMETOOLONG  [22mThe  length  of  [4mpath[24m  exceeds
83[1mCA_MAXPATHLEN [22mor the length  of
84                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
85NAMELEN[22m.
86
87       [1mSENOSHOST    [22mHost unknown.
88
89       [1mSENOSSERV    [22mService unknown.
90
91       [1mSECOMERR     [22mCommunication error.
92
93       [1mENSNACT      [22mName server is not running or is being
94shutdown.
95
96[1mSEE ALSO[0m
97       [1mCastor_limits(4)[22m,              [1mlfc_chdir(3)[22m,
98[1mCupvlist(1)[0m
99
100[1mAUTHOR[0m
101       [1mLCG Grid Deployment [22mTeam
102
103
104
105LFC                         $Date:    2003/09/02    07:15:00    $
106LFC_CHOWN(3)
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum