-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
access mode of files created by output_file is surprising #2530
Comments
Fixed in 4a85db1, now the default mode is |
Thanks! |
Sorry for digging this one up again. fopen() in the Open Group Specification reads:
The system will usually strip I can do a pull request for that if you want. |
@arogge, good catch, thanks.
Please, do. |
The previous fix for this in 4a85db1 was incomplete. The intent was to mimic what `fopen()` is doing. As per standard[1] `fopen()` also sets `S_IWGRP` and `S_IWOTH` and lets the umask handle the rest. [1] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/fopen.html
The previous fix for this in 4a85db1 was incomplete. The intent was to mimic what `fopen()` is doing. As per standard[1] `fopen()` also sets `S_IWGRP` and `S_IWOTH` and lets the umask handle the rest. [1] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/fopen.html
See PR #2733 |
The previous fix for this in 4a85db1 was incomplete. The intent was to mimic what `fopen()` is doing. As per standard[1] `fopen()` also sets `S_IWGRP` and `S_IWOTH` and lets the umask handle the rest. [1] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/fopen.html
Hi,
In 8.0.1 at least, on POSIX, files created by fmt::output_file explicitly set themselves to be readable and writable by the user only.
This led to some issues after I moved to fmt::output_file since all of a sudden my files could no longer be read by the web server.
POSIX custom is to set a broader default permission (0660 for example), and let the operator tone that down using their umask setting.
Now it may be that fmt has a good reason for 0600 of course, but it is a bit surprising. There is also no way to change this mode.
Thoughts? Can I help?
Bert (formerly powerdns_bert)
The text was updated successfully, but these errors were encountered: