Skip to content

umasked os.makedirs() sometimes fails on Emscripten #135783

Open
@freakboy3742

Description

@freakboy3742

Bug report

Bug description:

When os.umask is used on a os.makedirs() call, the permissions aren't always honoured:

os.umask(0o002)
os.makedirs("./dir1/dir2")
print(os.stat("./dir1").st_mode & 0o777)

Should return 0o775; but returns 0o755 on some installs.

This can be observed as a failure of test_os.MakedirTests.test_mode. The Emscripten buildbot fails consistently on this; it also fails on my macOS machine. However, @hoodmane has been unable to reproduce it. The test has been skipped as part of #127146 to get a passing buildbot; more investigation is required.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixes3.15new features, bugs and security fixesOS-emscriptentype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions