set the POSIX ACL attached to a file
This function sets the POSIX Access Control List (ACL) attached to path
.
The acltype
parameter may be:
access
Set the ordinary (access) ACL for any file, directory or other filesystem object.
default
Set the default ACL. Normally this only makes sense if path
is a directory.
The acl
parameter is the new ACL in either "long text form" or "short text form" (see acl(5)). The new ACL completely
replaces any previous ACL on the file. The ACL must contain the full Unix permissions (eg. "u:GuestfsSession:rwx
,g:
GuestfsSession:rx
,o:GuestfsSession:rx
").
If you are specifying individual users or groups, then the mask field is also required (eg. "m:GuestfsSession:rwx
"),
followed by the "u:*ID*:..." and/or "g:*ID*:..." field(s). A full ACL string might therefore look like this:
<![CDATA[u:GuestfsSession:rwx
,g:GuestfsSession:rwx
,o:GuestfsSession:rwx
,m:
GuestfsSession:rwx
,u:500GuestfsSession:rwx
,g:500GuestfsSession:rwx
]]>
<![CDATA[\ Unix permissions / \mask/ \ ACL /]]>
You should use numeric UIDs and GIDs. To map usernames and groupnames to the correct numeric ID in the context of the guest, use the Augeas functions (see aug_init).
This function depends on the feature "acl". See also feature_available .
this |
A GuestfsSession object |
true on success, false on error |