[][src]Function exacl::from_reader

pub fn from_reader<R: Read>(reader: R) -> Result<Vec<AclEntry>>

Read ACL entries from text.

Each ACL entry is presented on a separate line. A comment begins with # and proceeds to the end of the line. Within a field, leading or trailing white space are ignored.

  Three allowed forms:

  <allow>:<flags>:<kind>:<name>:<perms>
  <flags>:<kind>:<name>:<perms>
  <kind>:<name>:<perms>

  <allow> - one of "allow" or "deny"
  <flags> - comma-separated list of flags
  <kind>  - one of "user", "group", "other", "mask", "unknown"
  <name>  - user/group name (decimal id accepted)
  <perms> - comma-separated list of permissions

Supported flags and permissions vary by platform.

Supported abbreviations: d = default, r = read, w = write, x = execute, u = user, g = group, o = other, m = mask

Sample Input

allow::group:admin:read,write
g:admin:rw  # ignored
d:u:chip:rw
deny:file_inherit:user:chet:rwx

Errors

Returns an io::Error on failure.