Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server running Ubuntu 8.04 LTS with sftp running on it. My problem is that when I access the server with sftp (using the username of one of my admin accounts, not 'root') and upload a file it's saved with the permissions rwx------. I then have to manually change the permissions using sudo chmod 755 filename.

Is there any way to set the default save permissions?

share|improve this question

1 Answer 1

Change the Subsystem line in your sshd_config file:

Subsystem sftp /bin/sh -c 'umask 0022; /usr/libexec/openssh/sftp-server'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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