umask sets the default permissions for files and directories (RWX).
Basically it's a mask that combines with 0666 for files and 0777 for directories to give default permissions.
I think of it as subtracting the mask from the highest value gives you your new permissions on the files.
so umask 0022 will give you 0644 on files and 0755 on directories
|