Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.