Bugs item #1106572, was opened at 2005-01-21 04:42 Message generated for change (Comment added) made by ajung You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1106572&group_id=5470
Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andreas Jung (ajung) Assigned to: Nobody/Anonymous (nobody) Summary: os.makedirs() ignores mode parameter Initial Comment: os.makedirs('foo/x', 0777) does not create the directories with permissions g+rwx,u+rwx,o+rwx but instead: >>> import os >>> os.makedirs('foo/xx', 0777) >>> [2]+ Stopped python2.3 [EMAIL PROTECTED]:~/sandboxes/haufecms/instance/Products/HaufeCMS: ls -la foo insgesamt 12 drwxr-xr-x 3 ajung ajung 4096 2005-01-21 10:39 . drwxr-xr-x 19 ajung ajung 4096 2005-01-21 10:39 .. drwxr-xr-x 2 ajung ajung 4096 2005-01-21 10:39 xx This happens with Python 2.3.4 on Linux ---------------------------------------------------------------------- >Comment By: Andreas Jung (ajung) Date: 2005-01-26 08:22 Message: Logged In: YES user_id=11084 umask(0) does the job. In this case the documentation is completely misleading. The API reads as the 'mode' parameter is *the* umask. ---------------------------------------------------------------------- Comment By: Wummel (calvin) Date: 2005-01-24 07:48 Message: Logged In: YES user_id=9205 What is the current process umask? The resulting directory mode will always be (mode & ~umask & 0777). To be sure that os.makedirs() will use the given mode without modification, you have to execute os.umask(0) beforehand. So this bug is probably invalid if you forgot to set your umask accordingly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1106572&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com