ARCHIVE_ENTRY_ACL - Online Linux Manual PageSection : 3
Updated : February 15, 2017

NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, archive_entry_acl_next, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types functions for manipulating Access Control Lists in archive entry descriptions

LIBRARYStreaming Archive Library (libarchive, -larchive)

SYNOPSIS #include <archive_entry.h>
void archive_entry_acl_add_entry ( struct archive_entry *a , int type , int permset , int tag , int qualifier , const char *name );
void archive_entry_acl_add_entry_w ( struct archive_entry *a , int type , int permset , int tag , int qualifier , const wchar_t *name );
void archive_entry_acl_clear(struct archive_entry *a);
int archive_entry_acl_count(struct archive_entry *a , int type);
int archive_entry_acl_from_text ( struct archive_entry *a , const char *text , int type );
int archive_entry_acl_from_text_w ( struct archive_entry *a , const wchar_t *text , int type );
int archive_entry_acl_next ( struct archive_entry *a , int type , int *ret_type , int *ret_permset , int *ret_tag , int *ret_qual , const char **ret_name );
int archive_entry_acl_reset(struct archive_entry *a , int type);
char * archive_entry_acl_to_text ( struct archive_entry *a , ssize_t *len_p , int flags );
wchar_t * archive_entry_acl_to_text_w ( struct archive_entry *a , ssize_t *len_p , int flags );
int archive_entry_acl_types(struct archive_entry *a);

DESCRIPTIONThe Access Control Lists (ACLs) extend the standard Unix permission model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats.

POSIX.1e Access Control ListsA POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the permset are: Dv ARCHIVE_ENTRY_ACL_READ (r) Dv ARCHIVE_ENTRY_ACL_WRITE (w) Dv ARCHIVE_ENTRY_ACL_EXECUTE (x) The permissions correspond to the normal Unix permissions. The tag specifies the principal to which the permission applies. Valid values are: Dv ARCHIVE_ENTRY_ACL_USER The user specified by the name field. Dv ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. Dv ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. Dv ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. Dv ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file owner or a member of the owning group. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. All files have an access ACL (Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Directories have an additional ACL (Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly-created directory entries.

NFSv4 Access Control ListsA NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). There are four possible types of a NFSv4 ACE: Dv ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. Dv ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. Dv ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. Dv ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require given permissions. The tag specifies the principal to which the permission applies. Valid values are: Dv ARCHIVE_ENTRY_ACL_USER The user specified by the name field. Dv ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. Dv ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. Dv ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the name string and optionally the user or group ID in the qualifier integer. NFSv4 ACE permissions and flags are stored in the same permset bitfield. Some permissions share the same constant and permission character but have different effect on directories than on files. The following ACE permissions are supported: Dv ARCHIVE_ENTRY_ACL_READ_DATA (r) Read data (file). Dv ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (r) List entries (directory). ARCHIVE_ENTRY_ACL_WRITE_DATA (w) Write data (file). ARCHIVE_ENTRY_ACL_ADD_FILE (w) Create files (directory). Dv ARCHIVE_ENTRY_ACL_EXECUTE (x) Execute file or change into a directory. Dv ARCHIVE_ENTRY_ACL_APPEND_DATA (p) Append data (file). Dv ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (p) Create subdirectories (directory). Dv ARCHIVE_ENTRY_ACL_DELETE_CHILD (D) Remove files and subdirectories inside a directory. Dv ARCHIVE_ENTRY_ACL_DELETE (d) Remove file or directory. Dv ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (a) Read file or directory attributes. Dv ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (A) Write file or directory attributes. Dv ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (R) Read named file or directory attributes. Dv ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (W) Write named file or directory attributes. Dv ARCHIVE_ENTRY_ACL_READ_ACL (c) Read file or directory ACL. Dv ARCHIVE_ENTRY_ACL_WRITE_ACL (C) Write file or directory ACL. Dv ARCHIVE_ENTRY_ACL_WRITE_OWNER (o) Change owner of a file or directory. Dv ARCHIVE_ENTRY_ACL_SYNCHRONIZE (s) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: Dv ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (f) Inherit parent directory ACE to files. Dv ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (d) Inherit parent directory ACE to subdirectories. Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (i) Only inherit, do not apply the permission on the directory itself. Dv ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (n) Do not propagate inherit flags. Only first-level entries inherit ACLs. Dv ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S) Trigger alarm or audit on successful access. Dv ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (F) Trigger alarm or audit on failed access. Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (I) Mark that ACE was inherited.

Functions archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. archive_entry_acl_clear() removes all ACL entries and resets the enumeration pointer. archive_entry_acl_count() counts the ACL entries that have the given type mask. type can be the bitwise-or of Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and Dv ARCHIVE_ENTRY_ACL_TYPE_ALLOW Dv ARCHIVE_ENTRY_ACL_TYPE_DENY Dv ARCHIVE_ENTRY_ACL_TYPE_AUDIT Dv ARCHIVE_ENTRY_ACL_TYPE_ALARM for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-extended ACLs are added. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() add new (or merge with existing) ACL entries from (wide) text. The argument type may take one of the following values: Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Dv ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with archive_entry_acl_to_text() or respectively archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with default: are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries and entries beginning with the # character (comments) are skipped. archive_entry_acl_next() return the next entry of the ACL list. This functions may only be called after archive_entry_acl_reset() has indicated the presence of extended ACL entries. archive_entry_acl_reset() prepare reading the list of ACL entries with archive_entry_acl_next(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode 3 or set using chmod(2). Otherwise, the function returns the same value as archive_entry_acl_count(). archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the ACL entries for the given type into a (wide) string of ACL entries separated by newline. If the pointer len_p is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by len_p. The flag argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS Output access ACLs. Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. Dv ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT Prefix each default ACL entry with the word default:. Dv ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs don not contain a double colon. The following flags are effecive only on NFSv4 ACL: Dv ARCHIVE_ENTRY_ACL_STYLE_COMPACT Do not output minus characters for unset permissions and flags in NFSv4 ACL permission and flag fields. The following flags are effective on both POSIX.1e and NFSv4 ACL: Dv ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Add an additional colon-separated field containing the user or group id. Dv ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access and default entries are returned and default entries are prefixed with default:. archive_entry_acl_types() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries.

RETURN VALUES archive_entry_acl_count() and archive_entry_acl_reset() returns the number of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() return ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. archive_entry_acl_next() returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has not been called first. archive_entry_acl_to_text() returns a string representing the ACL entries matching the given type and flags on success or NULL on error. archive_entry_acl_to_text_w() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on error. archive_entry_acl_types() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries.

SEE ALSOarchive_entry(3), libarchive(3)
0
Johanes Gumabo
Data Size   :   36,889 byte
man-archive_entry_acl.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 198,685
Visitor ID   :     :  
Visitor IP   :   18.227.13.119   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (mdoc_err|80|archive_entry_acl.3|124|Dv|.It Dv ARCHIVE_ENTRY_ACL_READ ( Sy r ) )         (mdoc_err|80|archive_entry_acl.3|125|Dv|.It Dv ARCHIVE_ENTRY_ACL_WRITE ( Sy w ) )         (mdoc_err|80|archive_entry_acl.3|126|Dv|.It Dv ARCHIVE_ENTRY_ACL_EXECUTE ( Sy x ) )         (mdoc_err|80|archive_entry_acl.3|135|Dv|.It Dv ARCHIVE_ENTRY_ACL_USER )         (mdoc_err|80|archive_entry_acl.3|137|Dv|.It Dv ARCHIVE_ENTRY_ACL_USER_OBJ )         (mdoc_err|80|archive_entry_acl.3|139|Dv|.It Dv ARCHIVE_ENTRY_ACL_GROUP )         (mdoc_err|80|archive_entry_acl.3|141|Dv|.It Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ )         (mdoc_err|80|archive_entry_acl.3|143|Dv|.It Dv ARCHIVE_ENTRY_ACL_MASK )         (mdoc_err|80|archive_entry_acl.3|145|Dv|.It Dv ARCHIVE_ENTRY_ACL_OTHER )         (mdoc_err|80|archive_entry_acl.3|158|Dv|.Pq Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS . )         (mdoc_err|80|archive_entry_acl.3|161|Dv|.Pq Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT , )         (mdoc_err|80|archive_entry_acl.3|169|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ALLOW )         (mdoc_err|80|archive_entry_acl.3|171|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_DENY )         (mdoc_err|80|archive_entry_acl.3|173|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_AUDIT )         (mdoc_err|80|archive_entry_acl.3|175|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ALARM )         (mdoc_err|80|archive_entry_acl.3|185|Dv|.It Dv ARCHIVE_ENTRY_ACL_USER )         (mdoc_err|80|archive_entry_acl.3|187|Dv|.It Dv ARCHIVE_ENTRY_ACL_USER_OBJ )         (mdoc_err|80|archive_entry_acl.3|189|Dv|.It Dv ARCHIVE_ENTRY_ACL_GROUP )         (mdoc_err|80|archive_entry_acl.3|191|Dv|.It Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ )         (mdoc_err|80|archive_entry_acl.3|193|Dv|.It Dv ARCHIVE_ENTRY_ACL_EVERYONE )         (mdoc_err|80|archive_entry_acl.3|214|Dv|.It Dv ARCHIVE_ENTRY_ACL_READ_DATA ( Sy r ) )         (mdoc_err|80|archive_entry_acl.3|216|Dv|.It Dv ARCHIVE_ENTRY_ACL_LIST_DIRECTORY ( Sy r ) )         (mdoc_err|80|archive_entry_acl.3|222|Dv|.It Dv ARCHIVE_ENTRY_ACL_EXECUTE ( Sy x ) )         (mdoc_err|80|archive_entry_acl.3|224|Dv|.It Dv ARCHIVE_ENTRY_ACL_APPEND_DATA ( Sy p ) )         (mdoc_err|80|archive_entry_acl.3|226|Dv|.It Dv ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY ( Sy p ) )         (mdoc_err|80|archive_entry_acl.3|228|Dv|.It Dv ARCHIVE_ENTRY_ACL_DELETE_CHILD ( Sy D ) )         (mdoc_err|80|archive_entry_acl.3|230|Dv|.It Dv ARCHIVE_ENTRY_ACL_DELETE ( Sy d ) )         (mdoc_err|80|archive_entry_acl.3|232|Dv|.It Dv ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES ( Sy a ) )         (mdoc_err|80|archive_entry_acl.3|234|Dv|.It Dv ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES ( Sy A ) )         (mdoc_err|80|archive_entry_acl.3|236|Dv|.It Dv ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS ( Sy R ) )         (mdoc_err|80|archive_entry_acl.3|238|Dv|.It Dv ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS ( Sy W ) )         (mdoc_err|80|archive_entry_acl.3|240|Dv|.It Dv ARCHIVE_ENTRY_ACL_READ_ACL ( Sy c ) )         (mdoc_err|80|archive_entry_acl.3|242|Dv|.It Dv ARCHIVE_ENTRY_ACL_WRITE_ACL ( Sy C ) )         (mdoc_err|80|archive_entry_acl.3|244|Dv|.It Dv ARCHIVE_ENTRY_ACL_WRITE_OWNER ( Sy o ) )         (mdoc_err|80|archive_entry_acl.3|246|Dv|.It Dv ARCHIVE_ENTRY_ACL_SYNCHRONIZE ( Sy s ) )         (mdoc_err|80|archive_entry_acl.3|252|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT ( Sy f ) )         (mdoc_err|80|archive_entry_acl.3|254|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT ( Sy d ) )         (mdoc_err|80|archive_entry_acl.3|256|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY ( Sy i ) )         (mdoc_err|80|archive_entry_acl.3|258|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT ( Sy n ) )         (mdoc_err|80|archive_entry_acl.3|261|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS ( Sy S ) )         (mdoc_err|80|archive_entry_acl.3|263|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS ( Sy F ) )         (mdoc_err|80|archive_entry_acl.3|265|Dv|.It Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERITED ( Sy I ) )         (mdoc_err|80|archive_entry_acl.3|285|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS )         (mdoc_err|80|archive_entry_acl.3|286|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT )         (mdoc_err|80|archive_entry_acl.3|290|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ALLOW )         (mdoc_err|80|archive_entry_acl.3|291|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_DENY )         (mdoc_err|80|archive_entry_acl.3|292|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_AUDIT )         (mdoc_err|80|archive_entry_acl.3|293|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ALARM )         (mdoc_err|80|archive_entry_acl.3|313|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS )         (mdoc_err|80|archive_entry_acl.3|314|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT )         (mdoc_err|80|archive_entry_acl.3|315|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_NFS4 )         (mdoc_err|80|archive_entry_acl.3|375|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS )         (mdoc_err|80|archive_entry_acl.3|377|Dv|.It Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT )         (mdoc_err|80|archive_entry_acl.3|379|Dv|.It Dv ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT )         (mdoc_err|80|archive_entry_acl.3|382|Dv|.It Dv ARCHIVE_ENTRY_ACL_STYLE_SOLARIS )         (mdoc_err|80|archive_entry_acl.3|388|Dv|.It Dv ARCHIVE_ENTRY_ACL_STYLE_COMPACT )         (mdoc_err|80|archive_entry_acl.3|395|Dv|.It Dv ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID )         (mdoc_err|80|archive_entry_acl.3|397|Dv|.It Dv ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA )