-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
os: Mkdir ignores perm on Windows #65377
Comments
According to the OS package's documentation on
This may just be a situation where the write bit doesn't have any meaning on Windows for directories. |
Actually, I don't know what the write behavior here is. I can tell that But, I don't know if the correct thing to do here is to just set the mode afterwards on Windows. I'm guessing since CC @qmuntal ... maybe? I'm not sure if this specifically is really your area of expertise with Windows, so apologies for the noise if not. |
It does, if you call Both |
We could use
This limitation doesn't seem specific to IMO there is nothing we can do here. |
Interesting! Didn't know that setting read-only on a directory doesn't actually make it read-only. However, contrary to documentation, setting read-only on a directory does do something: it prevents deletion: md d
attrib +r d
REM will fail with "access denied"
rd d
attrib -r d
REM will succeed
rd d |
Good catch. Then it is ok for me to honor the permissions by calling |
@qmuntal When I was viewing the issue. I found out that there is a obvious difference between the |
Go version
go version go1.21.6 windows/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Command output:
What did you expect to see?
Command output:
The text was updated successfully, but these errors were encountered: