1DPNS_CHMOD(3) DPNS Library Functions DPNS_CHMOD(3)
2
3
4
6 dpns_chmod - change access mode of a DPNS directory/file in the name
7 server
8
10 #include <sys/types.h>
11 #include "dpns_api.h"
12
13 int dpns_chmod (const char *path, mode_t mode)
14
16 dpns_chmod sets the access permission portion of the mode of a DPNS
17 directory/file in the name server to the bit pattern in mode.
18
19 path specifies the logical pathname relative to the current DPNS
20 directory or the full DPNS pathname.
21
22 mode is constructed by OR'ing the bits defined in <sys/stat.h> under
23 Unix or "statbits.h" under Windows/NT:
24
25 S_ISUID 0004000 set user ID on execution
26 S_ISGID 0002000 set group ID on execution
27 S_ISVTX 0001000 sticky bit
28 S_IRUSR 0000400 read by owner
29 S_IWUSR 0000200 write by owner
30 S_IXUSR 0000100 execute/search by owner
31 S_IRGRP 0000040 read by group
32 S_IWGRP 0000020 write by group
33 S_IXGRP 0000010 execute/search by group
34 S_IROTH 0000004 read by others
35 S_IWOTH 0000002 write by others
36 S_IXOTH 0000001 execute/search by others
37
38 The effective user ID of the process must match the owner of the file
39 or the caller must have ADMIN privilege in the Cupv database. If a
40 directory is writable and has the sticky bit set, files/directories
41 within that directory can be removed or renamed only if:
42
43 the effective user ID of the requestor matches the owner ID of
44 the file or
45
46 the effective user ID of the requestor matches the owner ID of
47 the directory or
48
49 the file is writable by the requestor or
50
51 the requestor has ADMIN privilege in the Cupv database.
52
54 This routine returns 0 if the operation was successful or -1 if the
55 operation failed. In the latter case, serrno is set appropriately.
56
58 EPERM The effective user ID does not match the owner of the file
59 and the caller does not have ADMIN privilege in the Cupv
60 database.
61
62 ENOENT The named file/directory does not exist or is a null path‐
63 name.
64
65 EACCES Search permission is denied on a component of the path
66 prefix.
67
68 EFAULT path is a NULL pointer.
69
70 ENOTDIR A component of path prefix is not a directory.
71
72 ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of
73 a path component exceeds CA_MAXNAMELEN.
74
75 SENOSHOST Host unknown.
76
77 SENOSSERV Service unknown.
78
79 SECOMERR Communication error.
80
81 ENSNACT Name server is not running or is being shutdown.
82
84 Castor_limits(4), dpns_chdir(3), Cupvlist(1)
85
87 LCG Grid Deployment Team
88
89
90
91DPNS $Date: 2002/10/16 06:25:40 $ DPNS_CHMOD(3)