0

I have a user let call him bob connecting via sftp with bob account. using for client ftp-kr in VSCODE(osx) and server debian 9, I would like to setup a umask like for ftp service.

I tried adding umask 022 and also tried umask 0022 in both /home/bob/.bashrc and /home/bob/.profile

also tried Subsystem sftp /usr/lib/openssh/sftp-server -u 0022 in /etc/ssh/sshd_config

update: if I create a folder I get 755 as expected but not with files; getting 644.

if I type umask I get 0022 as active umask

jotyhista
  • 57
  • 1
  • 1
  • 7
  • So what permission do you get with files? Also, what client are you using? Some clients will attempt to set the permissions. Also, did you restart sshd after changing the sshd_config? – Zoredache Mar 20 '18 at 23:18
  • using `ftp-kr` in `VSCode` and getting permissions `511` atm. I did restart sshd + reboot – jotyhista Mar 21 '18 at 00:27
  • Getting `511` is weird. I am not sure how that would happen. – Zoredache Mar 21 '18 at 20:24
  • even if I sftp with root I get 511 – jotyhista Mar 22 '18 at 18:05
  • So if you connect with winscp, filezilla, or some other sftp client and you create new folder and new empty file what permissions do you get on each? A umask of `022` should result in direcotory files of 0755/0644. If you are getting 0511, something weird is going on. – Zoredache Mar 22 '18 at 18:15
  • actually I got confused (updated question) Im getting 644, not 511, sorry my bad!! Does that change anything ? If I ssh and create a file with any account including root I also get 644 – jotyhista Mar 22 '18 at 19:20
  • Permissions of `644` is what you should get for a regular file and umask `022`. – Zoredache Mar 22 '18 at 20:23

0 Answers0