-1

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.

Fluidbyte
  • 119
  • 1
  • 6

2 Answers2

0

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

Preston
  • 289
  • 1
  • 5
-1

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.