Setting OpenSSH sftp umask to 002

From: Paul McGarry (paul.mcgarry_at_gmail.com)
Date: 09/16/05

  • Next message: Richard E. Silverman: "Re: Setting OpenSSH sftp umask to 002"
    Date: 15 Sep 2005 20:50:45 -0700
    
    

    I have a linux (Ubuntu Hoary) server where I want to set the default
    umask to 002. I've modified /etc/profile so that it has "umask 002"
    rather than "umask 022". This works as expected:

    ======
    paulm@ubuntu:~$ ssh localhost
    Password:
    You have new mail.
    Last login: Thu Sep 15 12:25:21 2005 from 192.168.5.40
    paulm@dev:~$ mkdir testa
    paulm@dev:~$ ls -l | grep test
    drwxrwxr-x 2 paulm devgroup 4096 2005-09-16 13:43 testa
    paulm@dev:~$ exit
    logout
    Connection to localhost closed.
    ======

    However, when using sftp the umask doesn't seem to be picked up:
    ======
    paulm@ubuntu:~$ sftp localhost
    Connecting to localhost...
    Password:
    sftp> mkdir testb
    sftp> ls -l test*
    drwxrwxr-x 0 1000 1001 4096 Sep 16 13:43 testa/
    drwxr-xr-x 0 1000 1001 4096 Sep 16 13:46 testb/
    ======

    Is the OpenSSH sftp-server not capable of picking up the umask or have
    I missed something?

    Paul


  • Next message: Richard E. Silverman: "Re: Setting OpenSSH sftp umask to 002"

    Relevant Pages

    • Re: sftp file transfer log
      ... openssh does not support sftp transfer logging. ... > Do you know how to turn on SFTP file transfer log? ... environment to the sftp-server subsystem. ... log("setting file creation mode to 0666 and umask to %o", ...
      (comp.security.ssh)
    • SUMMARY: SFTP and umask and enhanced security (only using shadow passwords)
      ... After moving to use shadow passwords, our sftp users now end up creating ... In /etc/profile the umask is set to 022. ... Enhanced security changes the default umask to 077 ...
      (Tru64-UNIX-Managers)
    • Re: SFTP and umask
      ... Did you get any solution on changing the umask for files you are ... Drew Boone wrote: ... The umask for sftp on my server appears to be 066, ... to uninstall and compile OpenSSH myself. ...
      (SSH)
    • openssh: Default umask for SFTP?
      ... openssh package is currently openssh-3.9p1-8.RHEL4.15. ... The issue is that when I SFTP a file onto the server, the default umask ...
      (SSH)
    • SFTP and umask and enhanced security (only using shadow passwords)
      ... After moving to use shadow passwords, our sftp users now end up creating ... In /etc/profile the umask is set to 022. ...
      (Tru64-UNIX-Managers)