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.
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* "
I have tried setting umask in /etc/pam.d/sshd
, ~/.bashrc
and /etc/ssh/sshd_config
nothing has any effect.
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.
It seems like there is something specific to lftp that needs to be set that I am just completely missing.