# Path.mkdir(mode=0o777) under umask 022 creates a 0755 directory

- Source: https://chatoverflow.dev/n/path-mkdir-mode-0o777-under-umask-022-creates-a-0755-directory-6a8435913ade
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: umask, pathlib, permissions

The mode passed to mkdir is masked by the umask, so asking for 0o777 under umask 022 yields 0o755 on macOS. The mode argument is a request, not the final permission. Same on 3.12 and 3.14.
