224 lines
5.8 KiB
HTML
224 lines
5.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CHACL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CHACL</H1>
|
|
Section: Access Control Lists (1)<BR>Updated: ACL File Utilities<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
chacl - change the access control list of a file or directory
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>chacl acl pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -b acl dacl pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -d dacl pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -R pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -D pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -B pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -l pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<B>chacl -r pathname...</B>
|
|
|
|
<BR>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<I>chacl</I>
|
|
|
|
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
|
|
<B>SEE ALSO</B>
|
|
|
|
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).
|
|
<P>
|
|
|
|
<I>chacl</I>
|
|
|
|
changes the ACL(s) for a file or directory.
|
|
The ACL(s) specified are applied to each file in the <TT>pathname</TT> arguments.
|
|
<P>
|
|
|
|
Each ACL is a string which is interpreted using the
|
|
<I><A HREF="/cgi-bin/man/man2html?3+acl_from_text">acl_from_text</A></I>(3)
|
|
|
|
routine.
|
|
These strings are made up of comma separated clauses each of which
|
|
is of the form, tag:name:perm. Where <TT>tag</TT> can be:
|
|
<DL COMPACT>
|
|
<DT id="1">"user" (or "u")<DD>
|
|
indicating that the entry is a "user" ACL entry.
|
|
<DT id="2">"group" (or "g")<DD>
|
|
indicating that the entry is a "group" ACL entry.
|
|
<DT id="3">"other" (or "o")<DD>
|
|
indicating that the entry is an "other" ACL entry.
|
|
<DT id="4">"mask" (or "m")<DD>
|
|
indicating that the entry is a "mask" ACL entry.
|
|
</DL>
|
|
<P>
|
|
|
|
<TT>name</TT> is a string which is the user or group name for the ACL entry.
|
|
A null <TT>name</TT> in a user or group ACL entry indicates the file's
|
|
owner or file's group.
|
|
<TT>perm</TT> 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", "---".
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="5"><B>-b</B>
|
|
|
|
<DD>
|
|
Indicates that there are two ACLs to change, the first is the
|
|
file access ACL and the second the directory default ACL.
|
|
<DT id="6"><B>-d</B>
|
|
|
|
<DD>
|
|
Used to set only the default ACL of a directory.
|
|
<DT id="7"><B>-R</B>
|
|
|
|
<DD>
|
|
Removes the file access ACL only.
|
|
<DT id="8"><B>-D</B>
|
|
|
|
<DD>
|
|
Removes directory default ACL only.
|
|
<DT id="9"><B>-B</B>
|
|
|
|
<DD>
|
|
Remove all ACLs.
|
|
<DT id="10"><B>-l</B>
|
|
|
|
<DD>
|
|
Lists the access ACL and possibly the default ACL associated
|
|
with the specified files or directories. This option was added
|
|
during the Linux port of XFS, and is not IRIX compatible.
|
|
<DT id="11"><B>-r</B>
|
|
|
|
<DD>
|
|
Set the access ACL recursively for each subtree rooted at <TT>pathname</TT>(s).
|
|
This option was also added during the Linux port of XFS, and is not
|
|
compatible with IRIX.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
A minimum ACL:
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>chacl u::rwx,g::r-x,o::r-- file</B>
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
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:
|
|
<P>
|
|
|
|
<PRE>
|
|
<TT>chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2</TT>
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
To set the default and access ACLs on <TT>newdir</TT> to be the
|
|
same as on <TT>olddir</TT>, you could type:
|
|
<P>
|
|
|
|
<PRE>
|
|
<TT>chacl -b `chacl -l olddir | \
|
|
sed -e 's/.*\[//' -e 's#/# #' -e 's/]$//'` newdir
|
|
</TT>
|
|
</PRE>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>CAUTIONS</H2>
|
|
|
|
<I>chacl</I>
|
|
|
|
can replace the existing ACL. To add or delete entries, you
|
|
must first do <TT>chacl -l</TT> to get the existing ACL, and use the output
|
|
to form the arguments to
|
|
<I>chacl</I>.
|
|
|
|
<P>
|
|
|
|
Changing the permission bits of a file will change the file access
|
|
ACL settings (see
|
|
<I><A HREF="/cgi-bin/man/man2html?1+chmod">chmod</A></I>(1)).
|
|
|
|
However, file creation mode masks (see
|
|
<I><A HREF="/cgi-bin/man/man2html?1+umask">umask</A></I>(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
|
|
<I><A HREF="/cgi-bin/man/man2html?5+attr">attr</A></I>(5)
|
|
|
|
for more information about extended attributes and see
|
|
<I><A HREF="/cgi-bin/man/man2html?8+xfsdump">xfsdump</A></I>(8)
|
|
|
|
for a method of backing them up under XFS.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+getfacl">getfacl</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+setfacl">setfacl</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+chmod">chmod</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+umask">umask</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?3+acl_from_text">acl_from_text</A></B>(3), <B><A HREF="/cgi-bin/man/man2html?5+acl">acl</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?8+xfsdump">xfsdump</A></B>(8)
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="17"><A HREF="#lbAG">CAUTIONS</A><DD>
|
|
<DT id="18"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:08 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|