I have a script that runs in aws which basically pulls data feeds via api then creates a folder which it then dumps a csv file into. Right now it is supposed to name the directory based on its name. It does create the folder but rather than creating it with inherited permissions it creates it with read only access and therefore cant dump the csv file. Now I can easily run chmod 755 on the folder and ill be fine, but I have thousands of folders to do and that will be a bit monotonous.
A value of
377 (or is that
0377) for the user mask is unusual to say the least, it resets all the access flags and only leaves read access to the file owner (if even resets the execute flags, making directories unusable even by their owner).
umask values are
0002: full r/w access to user and group, R/O access for others
0022: full r/w access to user only, R/O access for group and others
0077: full r/w access to user only, no access to others
To change the
umask you just add a
umask command in your
~/.profile but it is also possible that said
~/.profile already has a
umask 0377 command, that you just need to change or remove.