Opened 8 years ago
Last modified 7 years ago
#11179 new Feature Requests
create_directories() does not allow control of permissions
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Currently, there is no way to tell create_directory() or create_directories() what permissions to set for a new directory. This is particularly annoying when calling these functions from a library, where it's simply impossible to fiddle with umask.
It would be really nice to have an overload that allows permissions to be set.
Note:
See TracTickets
for help on using tickets.
Seconded, being unable to pass permissions (and being unable to adjust the umask) opens an attack vector, with the directory being created with wide open permissions before being able to fix up the permissions. The following example illustrates the issue:
Being able to pass permissions to create_directories would help with the race and would make it easier for developers to do the right thing (tm).