InnerhalbNach weiteren Dokumenten suchenSupport-Ressourcen | Dieses Buch im PDF-Format herunterladen (3611 KB)
setfacl(1)NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO NAME
SYNOPSIS
setfacl [-r] -md acl_entries file setfacl [-r] -f acl_filefile DESCRIPTIONFor each file specified, setfacl will either replace its entire ACL, including the default ACL on a directory, or it will add, modify, or delete one or more ACL entries, including default entries on directories. Setting an ACL on a file also modifies the file's permission bits. The user entry modifies the file owner permission bits. If you don't specify a mask entry, the group entry modifies the file group owner permission bits. If you specify a mask entry, the file group owner permission bits are modified based on the intersection (bitwise AND) of the group and mask entries. The other entry modifies the other permission bits. If you use the chmod(1) command to change the file group owner permissions on a file with ACL entries, both the file group owner permissions and the ACL mask are changed to the new permissions. Be aware that the new ACL mask permissions may change the effective permissions for additional users and groups who have ACL entries on the file. A directory may contain default ACL entries. If a file or directory is created in a directory that contains default ACL entries, the newly created file will have permissions generated according to the intersection of the default ACL entries and the permissions requested at creation time. The umask(1) will not be applied if the directory contains default ACL entries. If a default ACL is specified for a specific user (or users), the file will have a regular ACL created; otherwise, only the mode bits will be initialized according to the intersection described above. The default ACL should be thought of as the maximum discretionary access permissions that may be granted. acl_entries SyntaxFor the -m and -s options, acl_entries are one or more comma-separated ACL entries. An ACL entry consists of the following fields separated by colons:
The following table shows the valid ACL entries (default entries may only be specified for directories):
For the -d option, acl_entries are one or more comma-separated ACL entries without permissions. Note that the entries for file owner, file group owner, ACL mask, and others may not be deleted. OPTIONS
The options have the following meaning: EXAMPLESExample 1 Adding read permission onlyThe following example adds one ACL entry to file abc, which gives user shea read permission only.
Example 2 Replacing a file's entire ACLThe following example replaces the entire ACL for the file abc, which gives shea read access, the file owner all access, the file group owner read access only, the ACL mask read/write access, and others no access.
Note that after this command, the file permission bits are rwxr-----. Even though the file group owner was set with read/write permissions, the ACL mask entry limits it to have only read permissions. The mask entry also specifies the maximum permissions available to all additional user and group ACL entries. Once again, even though the user shea was set with all access, the mask limits it to have only read permissions. The ACL mask entry is a quick way to limit or open access to all the user and group entries in an ACL. For example, by changing the mask entry to read/write, both the file group owner and user shea would be given read/write access. Example 3 Setting the same ACL on two filesThe following example sets the same ACL on file abc as the file xyz.
FILESATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSOSunOS 5.7 Last Revised 23 Jul 1998NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO |
|||||||||||||