-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
File-creation mode should respect umask #16237
Comments
can you produce an example of what you want and when it fails? You can't ignore http://linux.die.net/man/2/open
|
Sure. I mean that either there should be a way to specify exactly the file-creation mode (I don't think any of the existing
So I'm not suggesting that there is any problem with And I think that even if there were an |
To follow up, given that file creation mode is given by |
I think that file creation using
open
should respect the mask set byumask
(at least on *nix). Currently,open
callsios_file
which uses a file-creation mode given in src/support/ios.c:fd = open_cloexec(fname, flags, S_IRUSR | S_IWUSR /* 0600 */ | S_IRGRP | S_IROTH /* 0644 */);
This gives every file user read-write permissions and group and other read-only permissions, regardless of the value of
umask
. On a multi-user system, teams may use theumask
builtin to specify a mask for file-creation; it makes sense to me to respect this inopen
.The text was updated successfully, but these errors were encountered: