1DPNS_CHOWN(3)                    DPNS      Library      Functions
2DPNS_CHOWN(3)
3
4
5
6[1mNAME[0m
7       dpns_chown  ‐  change  owner  and group of a DPNS directo‐
8ry/file in the
9       name server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "dpns_api.h"[0m
14
15       [1mint  dpns_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 dpns_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       [1mdpns_chown  [22msets  the owner and the group of a DPNS
23directory/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, [1mdp‐
27ns_chown()  [22mdoes  not  change  the
28       corresponding ID of the file.
29
30       [1mdpns_lchown   [22mis    identical    to   [1mdpns_chown
31[22mexcept for symbolic links: it
32       does  not follow the link but changes the ownership of the
33link itself.
34
35       [4mpath[24m   specifies the logical pathname  relative  to
36the  current  DPNS
37              directory or the full DPNS 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,             [1mdpns_chdir(3)[22m,
98[1mCupvlist(1)[0m
99
100[1mAUTHOR[0m
101       [1mLCG Grid Deployment [22mTeam
102
103
104
105DPNS                        $Date:    2003/09/02    07:15:00    $
106DPNS_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