Bug 133

Summary: hard-coded umask(022) in ssh.c:main() too inflexible
Product: Portable OpenSSH Reporter: Wolfgang Spraul <wspraul>
Component: scpAssignee: Kevin Steves <stevesk>
Status: CLOSED WORKSFORME    
Severity: enhancement    
Priority: P2    
Version: -current   
Hardware: ix86   
OS: Linux   

Description Wolfgang Spraul 2002-03-02 06:18:04 AEDT
There is a hardcoded umask(022) call right at the beginning of ssh.c:main(). 
The getuserattr() system does not exist in Linux, so there is no way to 
predefine other umasks for scp (scp does not evaluate .bashrc etc.).

E.g. I would like to define umask(002) to that uploaded files are group 
writable.

I understand the umask(022) might be important in some cases (setuid root), but 
I also think there should be a switch to turn that off and just continue with 
the previous process umask.

Either in the config file or as a command line switch.

Wolfgang
Comment 1 Kevin Steves 2002-03-31 06:37:13 AEST
need to think about this.  there are other permission
issues such as pid file created with 666 perms by sshd.
Comment 2 Damien Miller 2003-01-07 17:27:07 AEDT
Incorrect: scp does load .bashrc or whatever shell initalisation your shell uses
for non-interactive sessions. You can set umask there.
Comment 3 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED