.TH chacl 1 .SH NAME chacl \- change or list an Access Control List (ACL) .SH SYNOPSIS .B chacl acl pathname... .br .B chacl -b acl dacl pathname... .br .B chacl -d dacl pathname... .br .B chacl -R pathname... .br .B chacl -D pathname... .br .B chacl -B pathname... .br .B chacl -l pathname... .br .B chacl -r pathname... .br .SH DESCRIPTION .I chacl changes or lists the Access Control List(s) for a file or directory. The ACL(s) specified are applied to each file in the \f4pathname\f1 arguments. .P Each ACL is a string which is interpreted using the .IR acl_from_text (3) routine. These strings are made up of comma separated clauses each of which is of the form, tag:name:perm. Where \f4tag\fP can be: .TP "user" (or "u") indicating that the entry is a user ACL entry. .TP "group" (or "g") indicating that the entry is a group ACL entry. .TP "other" (or "o") indicating that the entry is an other ACL entry. .TP "mask" (or "m") indicating that the entry is a mask ACL entry. .P \f4name\fP is a string which is the user or group name for the ACL entry. A null \f4name\fP in a user or group ACL entry indicates the file's owner or file's group. \f4perm\fP is the string "rwx" where each of the entries may be replaced by a "-" indicating no access of that type, e.g. "r-x", "--x", "---". .SH OPTIONS .TP .B \-b Indicates that there are two ACLs to change, the first is the file access ACL and the second the directory default ACL. .TP .B \-d Used to set only the default ACL of a directory. .TP .B \-R Removes the file access ACL only. .TP .B \-D Removes directory default ACL only. .TP .B \-B Remove all ACLs. .TP .B \-l Lists the access ACL and possibly the default ACL associated with the specified files or directories. .TP .B \-r Set the access ACL recursively for each subtree rooted at \f4pathname\f1(s). .SH EXAMPLES A minimum ACL: .PP .nf \f3chacl u::rwx,g::r-x,o::r-- file\fP .fi .PP The file ACL is set so that the file's owner has "rwx", the file's group has read and execute, and others have read only access to the file. .P An ACL that is not a minimum ACL, that is, one that specifies a user or group other than the file's owner or owner's group, must contain a mask entry: .PP .nf \f4chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2\fP .fi .PP To set the default and access ACLs on \f4newdir\f1 to be the same as on \f4olddir\f1, you could type: .PP .nf \f4chacl -b `chacl -l olddir | \\ sed -e 's/.*\\[//' -e 's#/# #' -e 's/]$//'` newdir \fP .fi .SH CAUTIONS .I chacl can replace the existing ACL. To add or delete entries, you must first do \f4chacl -l\fP to get the existing ACL, and use the output to form the arguments to .IR chacl . .P Changing the permission bits of a file will change the file access ACL settings (see .IR chmod (1)). However, file creation mode masks (see .IR umask (1)) will not affect the access ACL settings of files created using directory default ACLs. .P ACLs are filesystem extended attributes and hence are not typically archived or restored using the conventional archiving utilities. See .IR attr (1) for more information about Extended Attributes and see .IR xfsdump (8) for a method to back them up. .SH SEE ALSO acl_from_text(3), attr(1), chmod(1), umask(1), xfsdump(8).