emscripten-core / emscripten-core/emscripten
Default umask 0o777 is too strict
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.12 (38d1292ba2f5b4a7c8518931f5ae6f97ef0f6827)
clang version 15.0.0 (https://github.com/llvm/llvm-project d58cc0839ee5935e649dbbc18c898a8e4bcd6724)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin
```
Emscripten defines the default umask as 0777:
https://github.com/emscripten-core/emscripten/blob/854adf6f7fdc44e433ac9c13335c2a224635a42d/system/lib/libc/emscripten_syscall_stubs.c#L31
The issue was reported before as #9916. The strict umask causes some test failures in CPython test suite on Node with NODERAWFS, because some files are created with permissions ``000``. I have not noticed the problem before because I was running the tests in a containerized environment with effective user root. Root has DAC override capability and can access files with permission ``000``.
A better default umask would be ``0027`` or ``0002``.
Contributor guide
Assessment
This issue has not been assessed yet.