STRPERM(3)

NAME
strperm - evaluate file permission expression

SYNOPSIS

DESCRIPTION
strperm applies a file permission expression in the null-terminated string s to the initial file permission mask p. The new permission mask is returned. If e not 0 then *e is set to point to the first unrecognized character in s.

A tape device specification is composed of one or more who-op-permission terms separated by ,. who selects portions of the permission bits and may be any combination of:

u   the user permission bits;

g   the group permission bits;

o   the `other' permission bits;

a   all permission bits.

If omitted, all permission bits are selected. op specifies how the original permission p is to be modified:

+
    | the new bits are set in p;

-   the new bits are cleared in p;

&   the new bits are and'd with p;

=   the select bits in p are set equal to the new bits

A permission expression term may also be an octal number. Octal specifications are inherently non-portable. Refer to chmod(1) for an explanation of this form.

SEE ALSO
chmod(1), ls(1), strmode(3)