title: Setting umask with lftp in bash
body: <p>I am trying to write a bash script to upload some files using lftp and need to set the umask to 002. I cant seem to figure out how this is done within the context of lftp. </p>
  
  <pre><code>lftp -c "open sftp://$STAGE_FTP_HOST
              user $STAGE_FTP_USER $STAGE_FTP_PASS
              cd web/content
              mirror -P --only-newer --reverse --delete --verbose --exclude wp-content/uploads --exclude wp-content/cache --exclude .git* "
  </code></pre>
  
  <p>I have tried setting umask in <code>/etc/pam.d/sshd</code>, <code>~/.bashrc</code> and <code>/etc/ssh/sshd_config</code> nothing has any effect. </p>
  
  <p>To clarify I need to add group permission to files and folders on the remote machine. So instead of 755 i need 775 instead of 644 i need 664.</p>
  
  <p>It seems like there is something specific to lftp that needs to be set that I am just completely missing.</p>