Make all new directories have 777 permissions Make all new directories have 777 permissions unix unix

Make all new directories have 777 permissions


Put:

os.umask(0000)

in the Python script before it creates the directory. If you can't change the Python script, put:

umask(0000)

in the Perl script before it calls the Python script.

When a new file or directory is created, the permissions are determined by taking the permissions specified in the call to creat() or mkdir(), and then masking off the bits that are specified in the umask.

Typically, applications specify 0666 or 0777 permissions when they call the function (depending on whether they're creating something that should be executable or not). A common value for umask is 022, which turns off group and world write permissions. If you don't want them turned off, use the above umask value to keep the permissions specified in the call.