[New-bugs-announce] [issue24617] os.makedirs()'s [mode] not correct
John Jones
report at bugs.python.org
Sun Jul 12 19:13:43 CEST 2015
New submission from John Jones:
os.makedirs() gives the optional variable mode to set the permissions on the directories it creates.
While it seems to work for all triplet octal values (777,755,etc) it doesn't seem to work on values with the sticky bit (1777,1755,etc)
I know that to set the value as octal, you need, for some reason, to prepend a '0' to the number, such that the final value is '01755' - but even if you do int('1755',8) the error is there. Below I make a directory and then chmod it to the right value:
os.makedirs('/Users/Carolin/Desktop/demo',01703)
drwx-----x 2 Carolin staff 68 12 Jul 18:53 demo
os.chmod('/Users/Carolin/Desktop/demo',01703)
drwx----wt 2 Carolin staff 68 12 Jul 18:53 demo
----------
messages: 246655
nosy: John Jones
priority: normal
severity: normal
status: open
title: os.makedirs()'s [mode] not correct
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24617>
_______________________________________
More information about the New-bugs-announce
mailing list