[Gllug] default umask - where set, scp & sftp

Alain Williams addw at phcomp.co.uk
Mon Sep 4 13:13:14 UTC 2006


On Mon, Sep 04, 2006 at 02:05:11PM +0100, Alain Williams wrote:
> I am trying to change the default umask setting for files put up to a server
> using scp and sftp. For straight login it is easy enough (/etc/bashrc, or /etc/profile)
> but scp & sftp ?
> 
> I thought that this would take me one minute to find, but can't.
> 
> Oh: Linux - RedHat enterprise 4 (well, Centos actually)

Sorry to answer my own question so quickly -- I had spent 1/2 hour puzzling.

The answer is that there is no config file to do so (or so it appears), it takes
it from the 'environment' in which ssh is started, ie /etc/init.d/sshd.
So I created /etc/sysconfig/sshd to contain an appropriate umask command, and
voila I get what I want.

For non RH people: /etc/sysconfig/sshd is run/dotted by /etc/init.d/sshd.

-- 
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/

#include <std_disclaimer.h>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list