Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2013-12-08.11:09:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za>
In-reply-to
Content
os.makedirs() can't create a directory with cleared write or list permission bits for owner when parent directories aren't created. This is because for parent directories same mode is used as for final directory.

Note that the mkdir utility creates parent directories with default mode (0o777 & ~umask).

$ mkdir -p -m 0 t1/t2/t3
$ ls -l -d t1 t1/t2 t1/t2/t3
drwxrwxr-x 3 serhiy serhiy 4096 Dec  7 22:30 t1/
drwxrwxr-x 3 serhiy serhiy 4096 Dec  7 22:30 t1/t2/
d--------- 2 serhiy serhiy 4096 Dec  7 22:30 t1/t2/t3/

The proposed patch emulates the mkdir utility.

See also issue19921.
History
Date User Action Args
2013-12-08 11:09:05serhiy.storchakasetrecipients: + serhiy.storchaka
2013-12-08 11:09:05serhiy.storchakasetmessageid: <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za>
2013-12-08 11:09:05serhiy.storchakalinkissue19930 messages
2013-12-08 11:09:05serhiy.storchakacreate