Opened 10 years ago
Last modified 5 years ago
#7273 new Bugs
Files created by boost::iostreams::mapped_file have unexpected permissions on Linux
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The mapped_file class opens the file unconditionally via:
::open(p.path.c_str(), flags, S_IRWXU);
Which sets the permissions to read, write, execute for the owner and no permissions for group or others.
This is quite unexpected, and since it cannot be changed by the caller, I think a more sane default behavior would be to just use the default of open and let the user's umask decide the permission of newly created files.
I.e. just remove the last parameter:
::open(p.path.c_str(), flags);
Note:
See TracTickets
for help on using tickets.
Hi Folks, I'm seeing the same issue on Boost 1.55.0.