Operating System - Linux
1748210 Members
3396 Online
108759 Solutions
New Discussion юеВ

Setting umask for incoming sftp users

 
MikeL_4
Super Advisor

Setting umask for incoming sftp users

We have users that send files to our server via sftp... We normallyhave umask set to 022 but for these files we would like to force a umask of 002...

I've tried to change in the .bash_profile but does not seem to make any difference...

Is there a way to change this???

We are running Red Hat Version 5 on this server..
2 REPLIES 2
MikeL_4
Super Advisor

Re: Setting umask for incoming sftp users

Found the resolution:

What I found is that according to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

[ftpuser=>]$ cat ./.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

umask 0002

#EOF
skt_skt
Honored Contributor

Re: Setting umask for incoming sftp users

looks similar to ~home/.netrc file on HP-UX .