1LFC_SETACL(3)                     LFC      Library      Functions
2LFC_SETACL(3)
3
4
5
6[1mNAME[0m
7       lfc_setacl ‐ set LFC directory/file access control lists
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "lfc_api.h"[0m
12
13       [1mint lfc_setacl  (const  char  *[4m[22mpath[24m[1m,  int
14[4m[22mnentries[24m[1m, struct lfc_acl *[4m[22macl[24m[1m)[0m
15
16[1mDESCRIPTION[0m
17       [1mlfc_setacl   [22msets  the  Access Control List associ‐
18ated with a LFC direc‐
19       tory/file.
20
21       [4mpath[24m   specifies the  logical   pathname   relative
22to  the  current  LFC
23              directory or the full LFC pathname.
24
25       [4mnentries[0m
26              specifies the number of entries present in the buf‐
27fer.
28
29       [4macl[24m    is  a  pointer to an array of lfc_acl struc‐
30tures provided by the
31              application.
32
33       struct lfc_acl {
34               unsigned char   a_type;
35               int             a_id;
36               unsigned char   a_perm;
37       };
38
39       [4ma_type[24m  is     the     ACL     type:    CNS_ACL_US‐
40ER_OBJ,     CNS_ACL_USER,
41              CNS_ACL_GROUP_OBJ, CNS_ACL_GROUP,  CNS_ACL_MASK  or
42CNS_ACL_OTHER.
43              Types  for  default   entries   are   obtained   by
44OR’ing  the  flag
45              CNS_ACL_DEFAULT with one of the above types.
46
47       [4ma_id[24m   is the user or group numeric id.
48
49       [4ma_perm[24m is the access permission in numeric form ob‐
50tained by OR’ing some
51              of the bits S_IROTH, S_IWOTH, S_IXOTH.
52
53       The  effective user ID of the process must match the owner
54of  the  file
55       or the caller must have ADMIN privilege in the Cupv  data‐
56base.
57
58[1mRETURN VALUE[0m
59       This  routine  returns  0  if the operation was successful
60or ‐1 if the
61       operation failed. In the latter case, [1mserrno [22mis set
62appropriately.
63
64[1mERRORS[0m
65       [1mEPERM         [22mThe  effective user ID does not match
66the owner of the file
67                    and  the  caller does not have  ADMIN  privi‐
68lege in the Cupv
69                    database.
70
71       [1mENOENT        [22mThe named file/directory does not ex‐
72ist or is a null path‐
73                    name.
74
75       [1mEACCES       [22mSearch  permission  is  denied   on  a
76component of the [4mpath[0m
77                    prefix.
78
79       [1mEFAULT        [4m[22mpath[24m  or  [4macl[24m is a NULL
80pointer.
81
82       [1mENOTDIR      [22mA component of [4mpath[24m  prefix  is
83not a directory.
84
85       [1mEINVAL        [4m[22mnentries[24m  is not greater  than
86zero  or  is  greater  than
87                    CA_MAXACLENTRIES or the ACL entries  are  not
88valid.
89
90       [1mENOSPC       [22mThe name server database is full.
91
92       [1mENAMETOOLONG  [22mThe   length  of  [4mpath[24m exceeds
93[1mCA_MAXPATHLEN [22mor the length of
94                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
95NAMELEN[22m.
96
97       [1mSENOSHOST    [22mHost unknown.
98
99       [1mSENOSSERV    [22mService unknown.
100
101       [1mSECOMERR     [22mCommunication error.
102
103       [1mENSNACT      [22mName server is not running or is being
104shutdown.
105
106[1mSEE ALSO[0m
107       [1mCastor_limits(4)[22m,              [1mlfc_chdir(3)[22m,
108[1mlfc_chmod(3)[22m, [1mlfc‐setacl(1)[0m
109
110[1mAUTHOR[0m
111       [1mLCG Grid Deployment [22mTeam
112
113
114
115LFC                         $Date:    2003/04/08    06:15:02    $
116LFC_SETACL(3)
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum