Skip to main content

Thread: SFTP umask


hello, new here, hope i'm posting in right place , that.

have exhausted search capabilities in trying set umask sftp sessions.

there seems 2 general solutions offered on various forums, neither of working me.

first use special umask flag within /etc/ssh/sshd_config, follows:
subsystem sftp /usr/lib/openssh/sftp-server -u 0002

second create wrapper script around sftp-server process:
tried creating shell script /usr/lib/openssh/sftp-server.sh with:
code:
#!/bin/bash umask 0002 /usr/lib/openssh/sftp-server
... telling sshd_config use that:
subsystem sftp /usr/lib/openssh/sftp-server.sh

(and of course restarting ssh either solution)

know script executed tried echoing statement text file. and, tried using "002" instead of "0002". but, whenever create new file via sftp still has 755 permissions.

i'm running ubuntu 11.04 openssh 5.8p1 , openssl 0.9.8o.

i've been loosing sanity working on today. ideas appreciated.


----- solved -----

hope can save else hours of frustration...

if you're using gui sftp application, check preferences setting permissions on upload.

turns out application overriding things tried earlier.



Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] SFTP umask


Ubuntu

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support