I have a weird issue when trying to upload files to a server using SFTP.
When for maximum security I use a user with a disabled shell ("/bin/false") to upload files, I get mode 640 for the uploaded files and this is not what I want (local files have mode 664).
However when I enable the shell "/bin/bash" for the same user I get the correct mode, 664.
I am not sure to understand what is happening here, why does disabling shell change the mode of the uploaded files?
My sshd configuration:
Port 22
Protocol 2
AcceptEnv LANG LC_*
UsePAM yes
UseDNS no
Subsystem sftp internal-sftp