-
Notifications
You must be signed in to change notification settings - Fork 80
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
dir_create() alters umask #293
Comments
Is this a duplicate of #284? |
I think it was created by the fix for that issue, and the problem is this line: Line 18 in 93e70a9
|
Yeah I see the issue from the man page now https://man7.org/linux/man-pages/man2/umask.2.html
So we need to reset it after the fact. |
That's such a weird interface, and it sounds like it could cause problems when there are multiple threads. (I mean the way that |
Yes I agree, but I don't think there is any other way we can do it. I tweaked when we do this and added a test in 857a814 |
Sorry to keep pressing on this, but as long as the global umask is being altered, I think it would be safer to:
The way things currently work, if there's a networked filesystem, the time between the two |
If we are calling chmod then we might as well forget about umask entirely. |
I was thinking you'd still set the I figured the umask stuff was there so you would respect the process umask (and not just set the permissions to whatever the user has requested) but I might not be fully understanding how this all works. |
Example:
Any files created after this point will be world readable and writable. For example:
The text was updated successfully, but these errors were encountered: