1RFIO_CHOWN(3) Rfio Library Functions RFIO_CHOWN(3)
2
3
4
6 rfio_chown - change owner and group of a directory/file
7
9 #include <sys/types.h>
10 #include "rfio_api.h"
11
12 int rfio_chown (const char *path, uid_t new_uid, gid_t new_gid)
13
15 rfio_chown sets the owner and the group of a directory/file to the
16 numeric values in owner and group respectively. If owner or group is
17 specified as -1, rfio_chown() does not change the corresponding ID of
18 the file.
19
20 path specifies the logical pathname relative to the current directory
21 or the full pathname.
22
23 The effective user ID of the process must match the owner of the file
24 or be super-user.
25
27 This routine returns 0 if the operation was successful or -1 if the
28 operation failed. In the latter case, serrno is set appropriately.
29
31 EPERM The effective user ID does not match the owner of the file
32 and is not super-user.
33
34 ENOENT The named file/directory does not exist or is a null path‐
35 name.
36
37 EACCES Search permission is denied on a component of the path
38 prefix or write permission on the file itself is denied.
39
40 EFAULT path is a NULL pointer.
41
42 ENOTDIR A component of path prefix is not a directory.
43
44 EINVAL new_uid or new_gid is invalid.
45
46 ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of
47 a path component exceeds CA_MAXNAMELEN.
48
49 SENOSHOST Host unknown.
50
51 SENOSSERV Service unknown.
52
53 SETIMEDOUT Timed out.
54
55 SECONNDROP Connection closed by remote end.
56
57 SECOMERR Communication error.
58
60 Castor_limits(4)
61
63 LCG Grid Deployment Team
64
65
66
67LCG $Date: 2005/03/31 13:13:02 $ RFIO_CHOWN(3)