Message246655
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 |
|
Date |
User |
Action |
Args |
2015-07-12 17:13:43 | John Jones | set | recipients:
+ John Jones |
2015-07-12 17:13:43 | John Jones | set | messageid: <1436721223.66.0.229120395272.issue24617@psf.upfronthosting.co.za> |
2015-07-12 17:13:43 | John Jones | link | issue24617 messages |
2015-07-12 17:13:43 | John Jones | create | |
|