MAN page from Trustix acl-2.2.23-2tr.i586.rpm
Section: Access Control Lists (1)
Updated: ACL File UtilitiesIndex
chacl - change the access control list of a file or directory
SYNOPSISchacl acl pathname...chacl -b acl dacl pathname...chacl -d dacl pathname...chacl -R pathname...chacl -D pathname...chacl -B pathname...chacl -l pathname...chacl -r pathname...
is an IRIX-compatibility command, and is maintained for thoseusers who are familiar with its use from either XFS or IRIX.Refer to theSEE ALSO
section below for a description of toolswhich conform more closely to the (withdrawn draft) POSIX 1003.1estandard which describes Access Control Lists (ACLs).
chaclchanges the ACL(s) for a file or directory.The ACL(s) specified are applied to each file in the pathname arguments.Each ACL is a string which is interpreted using theacl_from_text(3)routine.These strings are made up of comma separated clauses each of whichis of the form, tag:name:perm. Where tag can be:
- "user" (or "u")
- indicating that the entry is a user ACL entry.
- "group" (or "g")
- indicating that the entry is a group ACL entry.
- "other" (or "o")
- indicating that the entry is an other ACL entry.
- "mask" (or "m")
- indicating that the entry is a mask ACL entry.name is a string which is the user or group name for the ACL entry.A null name in a user or group ACL entry indicates the file'sowner or file's group.perm is the string "rwx" where each of the entries may be replacedby a "-" indicating no access of that type, e.g. "r-x", "--x", "---".
- Indicates that there are two ACLs to change, the first is thefile access ACL and the second the directory default ACL.
- Used to set only the default ACL of a directory.
- Removes the file access ACL only.
- Removes directory default ACL only.
- Remove all ACLs.
- Lists the access ACL and possibly the default ACL associatedwith the specified files or directories. This option was addedduring the Linux port of XFS, and is not IRIX compatible.
- Set the access ACL recursively for each subtree rooted at pathname(s).This option was also added during the Linux port of XFS, and is notcompatible with IRIX.
A minimum ACL:
chacl u::rwx,g::r-x,o::r-- file
The file ACL is set so that the file's owner has "rwx", the file'sgroup has read and execute, and others have read only access to the file.An ACL that is not a minimum ACL, that is, one that specifiesa user or group other than the file's owner or owner's group,must contain a mask entry:
chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2
To set the default and access ACLs on newdir to be the same as on olddir, you could type:
chacl -b `chacl -l olddir | \ sed -e 's/.*\[//' -e 's#/# #' -e 's/]$//'` newdir
can replace the existing ACL. To add or delete entries, youmust first do chacl -l
to get the existing ACL, and use the outputto form the arguments tochacl
.Changing the permission bits of a file will change the file accessACL settings (seechmod
(1)).However, file creation mode masks (seeumask
(1))will not affect the access ACL settings of files created using directory default ACLs. ACLs are filesystem extended attributes and hence are not typicallyarchived or restored using the conventional archiving utilities.Seeattr
(5)for more information about extended attributes and seexfsdump
(8)for a method of backing them up under XFS.
- SEE ALSO
This document was created byman2html,using the manual pages.