I have an Ubuntu Server 18.04.1 LTS running Pure-Ftpd (installed from ubuntu repos). I need to change file and directory permission to - respectively - 664 (default is 644) and 775 (this is default).

I have maded changes to /etc/pure-ftpd/pure-ftpd.conf umask line from 133:022 to 113:022 and restarted pure-ftpd service but nothing changed after uploading a file and a directory Filezilla 3.40 in sftp mode.

I have found this thread and changed the line:

Subsystem sftp /usr/lib/openssh/sftp-server

by adding -u 0002 at the end. Of course after this I did restart the service with service ssh restart. Still nothing. Does anybody know what I should change to get the desired permissions on files uploaded via sftp?


I have found an answer. It's quite simple. First of all I should configure umask parameter inside /etc/pure-ftpd/conf/Umask (I need to create this file) in form 002 002 (files directories). Secondly (for sftp) inside /etc/ssh/sshd_config I changed subsystem line to:

Subsystem       sftp    /usr/lib/openssh/sftp-server -u 002

and finally I did two restarts:

/etc/init.d/pure-ftpd restart
/etc/init.d/ssh restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.