STRPERM(3)

πŸ“¦ version 93vu, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

strperm β€” evaluate file permission expression πŸ’…

This is the STRPERM(3) page from the Library Functions Manual, bestie. We're doing file permission expressions today, and yes, it's giving low-level but make it cute. ✨

🌸 SYNOPSIS 🌸

int strperm(char* s, char** e, int p)

πŸ’– DESCRIPTION πŸ’–

Okay bestie, so strperm applies a file permission expression in the nul-terminated string s to the initial file permission mask p. It returns the new permission mask β€” periodt. If e is not 0, then *e is set to point to the first unrecognized character in s β€” literally the first "wait, what?" character. πŸ‘€

A tape device specification is composed of one or more who-op-permission terms separated by ,. (Yes, tape device specification β€” that's the wording, iykyk. We keep the lore.) The 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 who is omitted, all permission bits are selected. The 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 β€” no cap, that's just the truth. Refer to chmod(1) for an explanation of this form. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

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


Catch you later, bestie β€” this was STRPERM(3) πŸ’–βœ¨ The footer didn't give us a source/version or date, so that's the whole tea: just STRPERM(3), and we're out. πŸŽ€

πŸ“¦ where this page comes from