29 Input/output library [input.output]

29.11 File systems [filesystems]

29.11.14 Filesystem operation functions [fs.op.funcs]

29.11.14.26 Permissions [fs.op.permissions]

void permissions(const path& p, perms prms, perm_options opts=perm_options::replace); void permissions(const path& p, perms prms, error_code& ec) noexcept; void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
Preconditions: Exactly one of the perm_­options constants replace, add, or remove is present in opts.
Remarks: The second signature behaves as if it had an additional parameter perm_­options opts with an argument of perm_­options​::​replace.
Effects: Applies the action specified by opts to the file p resolves to, or to file p itself if p is a symbolic link and perm_­options​::​nofollow is set in opts.
The action is applied as if by POSIX fchmodat().
Note
:
Conceptually permissions are viewed as bits, but the actual implementation may use some other mechanism.
— end note
 ]
Throws: As specified in [fs.err.report].