Bug? umask does not seem to be respected #26026
-
umask (which masks out file permissions) does not seem to be respected. This can be demonstrated by running the following in a Codespaces terminal:
Note that the permissions of Is this behavior intended? |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments
-
Just to double check - are you doing this locally in the Remote - Containers extension or in a Codespace? If Remote - Containers, on Windows, “bind mounts” all have those permissions due to how Docker works on that platform. This should not happen in a Codespace, however. |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
Can you share the Dockerfile you used? It’s possible that there’s something in the image designed to do this for permissions purposes. |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
Okay got it - I wasn’t repro’ing since I was creating a folder outside of the workspace folder. What is going on is that the files in the workspace folder mounted from a mount point that is using an ACL that will set those permissions. If you go run
Then from the workspace folder run
You’ll see this:
Is this causing a problem for you? EDIT: There’s also a fix for this and things getting cloned as “root” coming soon. Both are related to the same problem. |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
We can provide an update here, but here’s a workaround for you near term.
That will remove the ACL and make sure you’re the owner of all files. At that point the umask should be respected. |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
FYI this umask behaviour breaks the CPython test suite. The above workaround fixes one test failure, but since this doesn't touch |
Beta Was this translation helpful? Give feedback.
-
This has been causing us headaches as well; subdirectories created under /tmp end up with unexpected 756 permissions instead of 755. When our build process zips these up, those permissions get stored, and cause problems later when we end up with non-traversable directories. The root of this is the
|
Beta Was this translation helpful? Give feedback.
We can provide an update here, but here’s a workaround for you near term.
That will remove the ACL and make sure you’re the owner of all files. At that point the umask should be respected.