# chacl - change the access control list of a file or directory - man(1) - [phpMan]

[_CHACL_(1)](https://www.chedong.com/phpMan.php/man/CHACL/1/markdown)                                Access Control Lists                                [_CHACL_(1)](https://www.chedong.com/phpMan.php/man/CHACL/1/markdown)

## NAME
       chacl - change the access control list of a file or directory

## SYNOPSIS
### chacl 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...

## DESCRIPTION
       _chacl_  is  an  IRIX-compatibility command, and is maintained for those users who are familiar
       with its use from either XFS or IRIX.  Refer to the **SEE ALSO **section below for a  description
       of tools which conform more closely to the (withdrawn draft) POSIX 1003.1e standard which de‐
       scribes Access Control Lists (ACLs).

       _chacl_  changes  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 the [_acl_from_text_(3)](https://www.chedong.com/phpMan.php/man/aclfromtext/3/markdown) routine.  These  strings
       are  made  up  of comma separated clauses each of which is 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's owner or file's group.  _**perm_ **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", "---".

## OPTIONS
### -b     
              second the directory default ACL.

### -d     

### -R     

### -D     

### -B     

### -l     
              or directories.  This option was added during the Linux port of XFS, and is  not  IRIX
              compatible.

### -r     
              was also added during the Linux port of XFS, and is not compatible with IRIX.

## EXAMPLES
       A minimum ACL:

         **chacl [u::rwx](https://www.chedong.com/phpMan.php/perldoc/u%3A%3Arwx/markdown),[g::r](https://www.chedong.com/phpMan.php/perldoc/g%3A%3Ar/markdown)-x,[o::r](https://www.chedong.com/phpMan.php/perldoc/o%3A%3Ar/markdown)-- file**

       The file ACL is set so that the file's owner has "rwx", the file's group has  read  and  exe‐
       cute, and others have read only access to the file.

       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:

         _**chacl_ [_u::rwx](https://www.chedong.com/phpMan.php/perldoc/u%3A%3Arwx/markdown),[g::r](https://www.chedong.com/phpMan.php/perldoc/g%3A%3Ar/markdown)-x,[o::r](https://www.chedong.com/phpMan.php/perldoc/o%3A%3Ar/markdown)--,u:bob:r--,[m::r](https://www.chedong.com/phpMan.php/perldoc/m%3A%3Ar/markdown)-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**

## CAUTIONS
       _chacl_ can replace the existing ACL.  To add or delete entries, you must first do _**chacl_ _-l_  **to
       get the existing ACL, and use the output to form the arguments to _chacl_.

       Changing  the  permission  bits  of  a  file  will  change  the file access ACL settings (see
       [_chmod_(1)](https://www.chedong.com/phpMan.php/man/chmod/1/markdown)).  However, file creation mode masks (see [_umask_(1)](https://www.chedong.com/phpMan.php/man/umask/1/markdown)) will not affect the  access  ACL
       settings of files created using directory default ACLs.

       ACLs  are filesystem extended attributes and hence are not typically archived or restored us‐
       ing the conventional archiving utilities.  See [_attr_(5)](https://www.chedong.com/phpMan.php/man/attr/5/markdown) for more  information  about  extended
       attributes and see [_xfsdump_(8)](https://www.chedong.com/phpMan.php/man/xfsdump/8/markdown) for a method of backing them up under XFS.

## SEE ALSO
       [**getfacl**(1)](https://www.chedong.com/phpMan.php/man/getfacl/1/markdown), [**setfacl**(1)](https://www.chedong.com/phpMan.php/man/setfacl/1/markdown), [**chmod**(1)](https://www.chedong.com/phpMan.php/man/chmod/1/markdown), [**umask**(1)](https://www.chedong.com/phpMan.php/man/umask/1/markdown), [**acl_from_text**(3)](https://www.chedong.com/phpMan.php/man/aclfromtext/3/markdown), [**acl**(5)](https://www.chedong.com/phpMan.php/man/acl/5/markdown), [**xfsdump**(8)](https://www.chedong.com/phpMan.php/man/xfsdump/8/markdown)

September 2001                           ACL File Utilities                                 [_CHACL_(1)](https://www.chedong.com/phpMan.php/man/CHACL/1/markdown)
