31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.13 Filesystem operation functions [fs.op.funcs]

31.12.13.27 Permissions [fs.op.permissions]

void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace); void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept; void filesystem::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.
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 1: 
Conceptually permissions are viewed as bits, but the actual implementation can use some other mechanism.
— end note]
Throws: As specified in [fs.err.report].
Remarks: The second signature behaves as if it had an additional parameter perm_options opts with an argument of perm_options​::​replace.