This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Recursively propagate the mode, in os.makedirs
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: dcasier
Priority: normal Keywords:

Created on 2022-01-13 10:07 by dcasier, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg410480 - (view) Author: Daviddcc (dcasier) Date: 2022-01-13 10:07
os.makedirs do not propagate the requested rights, recursively creating directories with a 777 mode :

def makedirs(name, mode=0o777, exist_ok=False):
(...)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok) # <= HERE
msg410483 - (view) Author: Daviddcc (dcasier) Date: 2022-01-13 10:28
This is the correct approach, with an umask configured
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90524
2022-01-13 10:28:59dcasiersetstatus: open -> closed
resolution: not a bug
messages: + msg410483

stage: resolved
2022-01-13 10:07:54dcasiercreate