## 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  describes
           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  p</I<B>pa</I<B>at</I<B>th</I<B>hn</I<B>na</I<B>am</I<B>me</I<B>e
           arguments.

           Each  ACL  is  a  string  which  is  interpreted using the
           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 t</I<B>ta</I<B>ag</I<B>g 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.

           n</I<B>na</I<B>am</I<B>me</I<B>e is a string which is the user or group name  for  the
           ACL entry.  A null n</I<B>na</I<B>am</I<B>me</I<B>e in a user or group ACL entry indi
           cates the file's owner  or  file's  group.   p</I<B>pe</I<B>er</I<B>rm</I<B>m  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     Indicates  that  there  are two ACLs to change, the
                  first is the file access ACL  and  the  second  the
                  directory default ACL.

                  rooted  at p</I<B>pa</I<B>at</I<B>th</I<B>hn</I<B>na</I<B>am</I<B>me</I<B>e(s).  This option was also added
                  during the Linux port of XFS, and is not compatible
                  with IRIX.

## EXAMPLES

           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's group 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 speci
           fies a user or  group  other  than  the  file's  owner  or
           owner's group, must contain a mask entry:

             c</I<B>ch</I<B>ha</I<B>ac</I<B>cl</I<B>l u</I<B>u:</I<B>::</I<B>:r</I<B>rw</I<B>wx</I<B>x,</I<B>,g</I<B>g:</I<B>::</I<B>:r</I<B>r-</I<B>-x</I<B>x,</I<B>,o</I<B>o:</I<B>::</I<B>:r</I<B>r-</I<B>--</I<B>-,</I<B>,u</I<B>u:</I<B>:b</I<B>bo</I<B>ob</I<B>b:</I<B>:r</I<B>r-</I<B>--</I<B>-,</I<B>,m</I<B>m:</I<B>::</I<B>:r</I<B>r-</I<B>-x</I<B>x f</I<B>fi</I<B>il</I<B>le</I<B>e1</I<B>1 f</I<B>fi</I<B>il</I<B>le</I<B>e2</I<B>2

           To  set  the  default  and access ACLs on n</I<B>ne</I<B>ew</I<B>wd</I<B>di</I<B>ir</I<B>r to be the
           same as on o</I<B>ol</I<B>ld</I<B>dd</I<B>di</I<B>ir</I<B>r, you could type:

             c</I<B>ch</I<B>ha</I<B>ac</I<B>cl</I<B>l -</I<B>-b</I<B>b `</I<B>`c</I<B>ch</I<B>ha</I<B>ac</I<B>cl</I<B>l -</I<B>-l</I<B>l o</I<B>ol</I<B>ld</I<B>dd</I<B>di</I<B>ir</I<B>r |</I<B>| \</I<B>\
                 s</I<B>se</I<B>ed</I<B>d -</I<B>-e</I<B>e '</I<B>'s</I<B>s/</I<B>/.</I<B>.*</I<B>*\</I<B>\[</I<B>[/</I<B>//</I<B>/'</I<B>' -</I<B>-e</I<B>e '</I<B>'s</I<B>s#</I<B>#/</I<B>/#</I<B># #</I<B>#'</I<B>' -</I<B>-e</I<B>e '</I<B>'s</I<B>s/</I<B>/]</I<B>]$</I<B>$/</I<B>//</I<B>/'</I<B>'`</I<B>` n</I<B>ne</I<B>ew</I<B>wd</I<B>di</I<B>ir</I<B>r

## CAUTIONS

           chacl can replace the existing  ACL.   To  add  or  delete
           entries,  you  must  first do c</I<B>ch</I<B>ha</I<B>ac</I<B>cl</I<B>l -</I<B>-l</I<B>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)).  However, file
           creation mode masks (see umask(1))  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  using  the conventional
           archiving utilities.  See  attr(5)  for  more  information
           about  extended attributes and see xfsdump(8) for a method
           of backing them up under XFS.

## SEE ALSO

           getfacl(1),      setfacl(1),      chmod(1),      umask(1),
           acl_from_text(3), acl(5), xfsdump(8)

    September 2001          ACL File Utilities               CHACL(1)