I'm trying to create directory with 777 rights.
os.mkdir(Xmldocument.directory, 0777)
However what I get is 775
drwxrwxr-x. 2 mwysoki mwysoki 4096 Nov 9 11:38 VeloDBBrowser
I'm sure that I have appropriate rights because chmod 777 works just fine.
The current umask is applied here as well.
Normally, files are created with 0777
(if executable or directory) or 0666
(other files.)
Then the OS applies the current umask to this value, resulting into 0755
resp. 0644
seen on most files, as the most usual umask is 0022
.
Your solution would be to set the umask to 0
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With