1ACL_SET_FD(3)            BSD Library Functions Manual            ACL_SET_FD(3)
2

NAME

4     acl_set_fd — set an ACL by file descriptor
5

LIBRARY

7     Linux Access Control Lists library (libacl, -lacl).
8

SYNOPSIS

10     #include <sys/types.h>
11     #include <sys/acl.h>
12
13     int
14     acl_set_fd(int fd, acl_t acl);
15

DESCRIPTION

17     The acl_set_fd() function associates an access ACL with the file referred
18     to by fd.
19
20     The effective user ID of the process must match the owner of the file or
21     the process must have the CAP_FOWNER capability for the request to suc‐
22     ceed.
23

RETURN VALUE

25     The acl_set_fd() function returns the value 0 if successful; otherwise
26     the value -1 is returned and the global variable errno is set to indicate
27     the error.
28

ERRORS

30     If any of the following conditions occur, the acl_set_fd() function re‐
31     turns the value -1 and and sets errno to the corresponding value:
32
33     [EBADF]            The fd argument is not a valid file descriptor.
34
35     [EINVAL]           The argument acl does not point to a valid ACL.
36
37                        The ACL has more entries than the file referred to by
38                        fd can obtain.
39
40     [ENOSPC]           The directory or file system that would contain the
41                        new ACL cannot be extended or the file system is out
42                        of file allocation resources.
43
44     [ENOTSUP]          The file identified by fd cannot be associated with
45                        the ACL because the file system on which the file is
46                        located does not support this.
47
48     [EPERM]            The process does not have appropriate privilege to
49                        perform the operation to set the ACL.
50
51     [EROFS]            This function requires modification of a file system
52                        which is currently read-only.
53

STANDARDS

55     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
56

SEE ALSO

58     acl_delete_def_file(3), acl_get_file(3), acl_set_file(3), acl_valid(3),
59     acl(5)
60

AUTHOR

62     Derived from the FreeBSD manual pages written by Robert N M Watson
63     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
64     <andreas.gruenbacher@gmail.com>.
65
66Linux ACL                       March 23, 2002                       Linux ACL
Impressum