[BACK]Return to chacl.1 CVS log [TXT][DIR] Up to [Development] / xfs-cmds / acl / man / man1

File: [Development] / xfs-cmds / acl / man / man1 / chacl.1 (download)

Revision 1.1, Mon Jan 15 10:28:46 2001 UTC (16 years, 9 months ago) by tes
Branch: MAIN
CVS Tags: Release-1_0_0

Add XFS/ACL support

.TH chacl 1
.SH NAME
chacl \- change or list the access control list of a file or directory
.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
.SH DESCRIPTION
.I chacl\^
changes or lists the Access Control List(s) for a file or directory.
The \f4-b\f1 flag indicates that there are two ACLs to change, 
the first is the
file access ACL and the second the directory default ACL. The \f4-d\f1 flag is 
used to set only the default ACL of a directory.  
The ACL(s) specified are applied to each file in the \f4pathname\f1 arguments.
The \f4-R\f1 and \f4-D\f1
flags are used to remove the file access ACL and directory default ACL respectively,
the \f4-B\f1 flag will remove all ACLs. 
The \f4-l\f1 flag is used to list the access ACL and possibly the
default ACL associated with the specified files or directories.
.P
Each ACL is a string which is processed via \f4acl_from_text\fP(3).
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 EXAMPLES

A minimum ACL:
\f3chacl u::rwx,g::r-x,o::r-- file\fP
.br
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:
\f4chacl u::rwx,g::r-x,o::r--,u:guest:r--,m::r-x file1 file2\fP
.P
To set the default and access ACLs on newdir to be the 
same as on oldir, you could type:
.P
\f4chacl -b `chacl -l olddir | sed -e 's/.*\\[//' -e 's#/# #' -e 's/]$//'` newdir
\fP
.SH CAUTIONS
\f4chacl\fP 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 \f4chacl\fP.
.P

Changing the permission bits of a file will change the file access ACL settings 
(see \f4chmod\fP(1)). Similarly file-creation mode masks can effect 
the access ACL settings of files created using directory default ACLs 
(see \f4umask\fP(1)).
.P
ACLs are filesystem extended attributes and are not typically archived 
or restored using conventional archiving utilities.
See \f4attr\fP(1) for more information 
about Extended Attributes and see \f4xfsdump\fP(8) 
for a method to back them up.
.SH SEE ALSO
acl_from_text(3),
umask(1),
xfsdump(8).
.SH CAVEATS
This command is likely to be deprecated when a standard file-system
independent ACL library is available.