Blame man/man1/chacl.1

rpm-build 0a0c83
.\" Copyright (C) 2001, 2002, 2004  Silicon Graphics, Inc.  All rights reserved.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" This is free documentation; you can redistribute it and/or
rpm-build 0a0c83
.\" modify it under the terms of the GNU General Public License as
rpm-build 0a0c83
.\" published by the Free Software Foundation; either version 2 of
rpm-build 0a0c83
.\" the License, or (at your option) any later version.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" The GNU General Public License's references to "object code"
rpm-build 0a0c83
.\" and "executables" are to be interpreted as the output of any
rpm-build 0a0c83
.\" document formatting or typesetting system, including
rpm-build 0a0c83
.\" intermediate and printed output.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" This manual is distributed in the hope that it will be useful,
rpm-build 0a0c83
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0a0c83
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rpm-build 0a0c83
.\" GNU General Public License for more details.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" You should have received a copy of the GNU General Public
rpm-build 0a0c83
.\" License along with this manual.  If not, see
rpm-build 0a0c83
.\" <http://www.gnu.org/licenses/>.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.TH CHACL 1 "ACL File Utilities" "September 2001" "Access Control Lists"
rpm-build 0a0c83
.SH NAME
rpm-build 0a0c83
chacl \- change the access control list of a file or directory
rpm-build 0a0c83
.SH SYNOPSIS
rpm-build 0a0c83
.B chacl acl pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-b acl dacl pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-d dacl pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-R pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-D pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-B pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-l pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.B chacl \-r pathname...
rpm-build 0a0c83
.br
rpm-build 0a0c83
.SH DESCRIPTION
rpm-build 0a0c83
.I chacl
rpm-build 0a0c83
is an IRIX-compatibility command, and is maintained for those
rpm-build 0a0c83
users who are familiar with its use from either XFS or IRIX.
rpm-build 0a0c83
Refer to the
rpm-build 0a0c83
.B "SEE ALSO"
rpm-build 0a0c83
section below for a description of tools
rpm-build 0a0c83
which conform more closely to the (withdrawn draft) POSIX 1003.1e
rpm-build 0a0c83
standard which describes Access Control Lists (ACLs).
rpm-build 0a0c83
.PP
rpm-build 0a0c83
.I chacl
rpm-build 0a0c83
changes the ACL(s) for a file or directory.
rpm-build 0a0c83
The ACL(s) specified are applied to each file in the \f4pathname\f1 arguments.
rpm-build 0a0c83
.P
rpm-build 0a0c83
Each ACL is a string which is interpreted using the
rpm-build 0a0c83
.IR acl_from_text (3)
rpm-build 0a0c83
routine.
rpm-build 0a0c83
These strings are made up of comma separated clauses each of which
rpm-build 0a0c83
is of the form, tag:name:perm.  Where \f4tag\fP can be:
rpm-build 0a0c83
.TP
rpm-build 0a0c83
"user" (or "u")
rpm-build 0a0c83
indicating that the entry is a user ACL entry.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
"group" (or "g")
rpm-build 0a0c83
indicating that the entry is a group ACL entry.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
"other" (or "o")
rpm-build 0a0c83
indicating that the entry is an other ACL entry.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
"mask" (or "m")
rpm-build 0a0c83
indicating that the entry is a mask ACL entry.
rpm-build 0a0c83
.P
rpm-build 0a0c83
\f4name\fP is a string which is the user or group name for the ACL entry.
rpm-build 0a0c83
A null \f4name\fP in a user or group ACL entry indicates the file's
rpm-build 0a0c83
owner or file's group.
rpm-build 0a0c83
\f4perm\fP is the string "rwx" where each of the entries may be replaced
rpm-build 0a0c83
by a "\-" indicating no access of that type, e.g. "r\-x", "\-\-x", "\-\-\-".
rpm-build 0a0c83
.SH OPTIONS
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-b
rpm-build 0a0c83
Indicates that there are two ACLs to change, the first is the
rpm-build 0a0c83
file access ACL and the second the directory default ACL.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-d
rpm-build 0a0c83
Used to set only the default ACL of a directory.  
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-R
rpm-build 0a0c83
Removes the file access ACL only.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-D
rpm-build 0a0c83
Removes directory default ACL only.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-B
rpm-build 0a0c83
Remove all ACLs. 
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-l
rpm-build 0a0c83
Lists the access ACL and possibly the default ACL associated
rpm-build 0a0c83
with the specified files or directories.  This option was added
rpm-build 0a0c83
during the Linux port of XFS, and is not IRIX compatible.
rpm-build 0a0c83
.TP
rpm-build 0a0c83
.B \-r
rpm-build 0a0c83
Set the access ACL recursively for each subtree rooted at \f4pathname\f1(s).
rpm-build 0a0c83
This option was also added during the Linux port of XFS, and is not
rpm-build 0a0c83
compatible with IRIX.
rpm-build 0a0c83
.SH EXAMPLES
rpm-build 0a0c83
A minimum ACL:
rpm-build 0a0c83
.PP
rpm-build 0a0c83
.nf
rpm-build 0a0c83
  \f3chacl u::rwx,g::r-x,o::r-- file\fP
rpm-build 0a0c83
.fi
rpm-build 0a0c83
.PP
rpm-build 0a0c83
The file ACL is set so that the file's owner has "rwx", the file's
rpm-build 0a0c83
group has read and execute, and others have read only access to the file.
rpm-build 0a0c83
.P
rpm-build 0a0c83
An ACL that is not a minimum ACL, that is, one that specifies
rpm-build 0a0c83
a user or group other than the file's owner or owner's group,
rpm-build 0a0c83
must contain a mask entry:
rpm-build 0a0c83
.PP
rpm-build 0a0c83
.nf
rpm-build 0a0c83
  \f4chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2\fP
rpm-build 0a0c83
.fi
rpm-build 0a0c83
.PP
rpm-build 0a0c83
To set the default and access ACLs on \f4newdir\f1 to be the 
rpm-build 0a0c83
same as on \f4olddir\f1, you could type:
rpm-build 0a0c83
.PP
rpm-build 0a0c83
.nf
rpm-build 0a0c83
  \f4chacl \-b `chacl \-l olddir | \\
rpm-build 0a0c83
      sed \-e 's/.*\\[//' \-e 's#/# #' \-e 's/]$//'` newdir
rpm-build 0a0c83
\fP
rpm-build 0a0c83
.fi
rpm-build 0a0c83
.SH CAUTIONS
rpm-build 0a0c83
.I chacl
rpm-build 0a0c83
can replace the existing ACL.  To add or delete entries, you
rpm-build 0a0c83
must first do \f4chacl \-l\fP to get the existing ACL, and use the output
rpm-build 0a0c83
to form the arguments to
rpm-build 0a0c83
.IR chacl .
rpm-build 0a0c83
.P
rpm-build 0a0c83
Changing the permission bits of a file will change the file access
rpm-build 0a0c83
ACL settings (see
rpm-build 0a0c83
.IR chmod (1)).
rpm-build 0a0c83
However, file creation mode masks (see
rpm-build 0a0c83
.IR umask (1))
rpm-build 0a0c83
will not affect the access ACL settings of files created using directory 
rpm-build 0a0c83
default ACLs. 
rpm-build 0a0c83
.P
rpm-build 0a0c83
ACLs are filesystem extended attributes and hence are not typically
rpm-build 0a0c83
archived or restored using the conventional archiving utilities.
rpm-build 0a0c83
See
rpm-build 0a0c83
.IR attr (5)
rpm-build 0a0c83
for more information about extended attributes and see
rpm-build 0a0c83
.IR xfsdump (8) 
rpm-build 0a0c83
for a method of backing them up under XFS.
rpm-build 0a0c83
.SH SEE ALSO
rpm-build 0a0c83
.BR getfacl "(1), " setfacl "(1), " chmod "(1), " umask "(1), " acl_from_text "(3), " acl "(5), " xfsdump (8)