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

I have an Ubuntu serve that I'm connecting to via SFTP (and also an SSHFS mount locally). When I move a file to the server via the mount I need it to have permissions set to 777.

I've added umask 000 to the .bashrc file at the advice of a friend and it doesn't appear to be working.

Basically I'm working completely in a restricted folder and need the root to always leave the permissions open - wether I'm SSH'ed in or moving files to the server.

share|improve this question

2 Answers 2

umask is a bit mask which represents the inverse of what the file permissions will be when a file is created.

Source: http://en.wikipedia.org/wiki/Umask

share|improve this answer

To refer to a previous answer regarding this; what you need to do is pass the sftp subsystem the appropriate umask parameters in sshd_config (mostly /etc/ssh/sshd_config)

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

then restart sshd. Although you may want to consider if full permissions are really required; there might be a more elegant solution.

share|improve this answer

Your Answer


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.