-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Fix artifact directories not having traversal permissions #4075
base: master
Are you sure you want to change the base?
Conversation
It turns out that Windows requires the executable bit set if the `BYPASS_TRAVERSE_CHECKING` privilege is not attached to a user's account. It's simply more correct to ensure that our directories have this bit set, and unfortunately our `filemode()` function call is not complete on Windows and does not include this bit, so we manually add it in on Windows.
8f3bb7a
to
d7ba620
Compare
Is this related to JuliaLang/julia#52272? |
It may not fix all cases, but it is one way such issues arise. |
Should we also be setting this bit on directories in Tar.extract? |
In my tests, Tar.extract didn’t set any permissions on directories on windows. |
Shall we merge this and have it backported to the upcoming 1.10.7 (if there is still time?) and 1.11 as well? |
Why are we still modifying file permissions on Windows at all? I'm still completely convinced that we should do absolutely nothing to modify file permissions on Windows systems, see JuliaLang/julia#52272 (comment) for my explanation of that. |
Libuv seems to agree with you: https://github.com/libuv/libuv/blob/31ea3411ccab6db63a3f573523be61f80f984d50/src/win/fs.c#L1840-L1849 I'm a bit surprised this even does anything.. I think libuv calls |
# If this is Windows, ensure the directory mode is executable, | ||
# as `filemode()` is incomplete. Some day, that may not be the | ||
# case, there exists a test that will fail if this is changes. | ||
new_path_mode |= 0o001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this again, shouldn't this actually be 0o111
?
I continue to believe that it's better to have However, at least for the present releases, I think this change is purely an improvement. ( |
I'm confused.. maybe I chased through the source code wrong, but based on the libuv implementation it really looks like the |
You want to take a look at this function, our fork has diverged from upstream libuv on this, because of work that Jameson and I did. |
It turns out that Windows requires the executable bit set if the
BYPASS_TRAVERSE_CHECKING
privilege is not attached to a user's account. It's simply more correct to ensure that our directories have this bit set, and unfortunately ourfilemode()
function call is not complete on Windows and does not include this bit, so we manually add it in on Windows.