1CHACL(1)                     Access Control Lists                     CHACL(1)
2
3
4

NAME

6       chacl - change the access control list of a file or directory
7

SYNOPSIS

9       chacl acl pathname...
10       chacl -b acl dacl pathname...
11       chacl -d dacl pathname...
12       chacl -R pathname...
13       chacl -D pathname...
14       chacl -B pathname...
15       chacl -l pathname...
16       chacl -r pathname...
17

DESCRIPTION

19       chacl  is  an  IRIX-compatibility  command, and is maintained for those
20       users who are familiar with its use from either XFS or IRIX.  Refer  to
21       the  SEE  ALSO  section  below for a description of tools which conform
22       more closely to the (withdrawn  draft)  POSIX  1003.1e  standard  which
23       describes Access Control Lists (ACLs).
24
25       chacl changes the ACL(s) for a file or directory.  The ACL(s) specified
26       are applied to each file in the pathname arguments.
27
28       Each ACL is a string which is interpreted  using  the  acl_from_text(3)
29       routine.   These strings are made up of comma separated clauses each of
30       which is of the form, tag:name:perm.  Where tag can be:
31
32       "user" (or "u")
33              indicating that the entry is a user ACL entry.
34
35       "group" (or "g")
36              indicating that the entry is a group ACL entry.
37
38       "other" (or "o")
39              indicating that the entry is an other ACL entry.
40
41       "mask" (or "m")
42              indicating that the entry is a mask ACL entry.
43
44       name is a string which is the user or group name for the ACL entry.   A
45       null  name  in  a user or group ACL entry indicates the file's owner or
46       file's group.  perm is the string "rwx" where each of the  entries  may
47       be  replaced  by  a  "-" indicating no access of that type, e.g. "r-x",
48       "--x", "---".
49

OPTIONS

51       -b     Indicates that there are two ACLs to change, the  first  is  the
52              file access ACL and the second the directory default ACL.
53
54       -d     Used to set only the default ACL of a directory.
55
56       -R     Removes the file access ACL only.
57
58       -D     Removes directory default ACL only.
59
60       -B     Remove all ACLs.
61
62       -l     Lists  the  access  ACL  and possibly the default ACL associated
63              with the specified files or directories.  This option was  added
64              during the Linux port of XFS, and is not IRIX compatible.
65
66       -r     Set  the access ACL recursively for each subtree rooted at path‐
67              name(s).  This option was also added during the  Linux  port  of
68              XFS, and is not compatible with IRIX.
69

EXAMPLES

71       A minimum ACL:
72
73         chacl u::rwx,g::r-x,o::r-- file
74
75       The  file  ACL  is  set  so that the file's owner has "rwx", the file's
76       group has read and execute, and others have read  only  access  to  the
77       file.
78
79       An ACL that is not a minimum ACL, that is, one that specifies a user or
80       group other than the file's owner or owner's group, must contain a mask
81       entry:
82
83         chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2
84
85       To  set the default and access ACLs on newdir to be the same as on old‐
86       dir, you could type:
87
88         chacl -b `chacl -l olddir | \
89             sed -e 's/.*\[//' -e 's#/# #' -e 's/]$//'` newdir
90

CAUTIONS

92       chacl can replace the existing ACL.  To add or delete entries, you must
93       first  do  chacl -l to get the existing ACL, and use the output to form
94       the arguments to chacl.
95
96       Changing the permission bits of a file will change the file access  ACL
97       settings  (see  chmod(1)).   However,  file  creation  mode  masks (see
98       umask(1)) will not affect the access  ACL  settings  of  files  created
99       using directory default ACLs.
100
101       ACLs  are  filesystem  extended  attributes and hence are not typically
102       archived or restored using the conventional archiving  utilities.   See
103       attr(5)  for  more  information  about extended attributes and see xfs‐
104       dump(8) for a method of backing them up under XFS.
105

SEE ALSO

107       getfacl(1), setfacl(1), chmod(1), umask(1),  acl_from_text(3),  acl(5),
108       xfsdump(8)
109
110
111
112September 2001                ACL File Utilities                      CHACL(1)
Impressum