title: Set Different Umask For Files And Folders
body: <p>I am writing a bash script to update some files/directories and I want to run umask in the script to set default permissions for files/directories created by the script. I know I can umask to set the permissions for both files and directories however I need the permissions to be different for files and folders.</p>
  
  <pre><code>I want files to be:   -rw----r-- (0604)
  I want folders to be: drwx-----x (0701)
  </code></pre>
  
  <p>Can I do this using umask? If so how do I go about doing it? If not what is the best way to achieve it? Thank you in advance.</p>