ssh , scp umask
You can specify the umask with the command umask 0027. The SunSSH implementation of Secure Shell is a fork of the OpenSSH (project. Security fixes for vulnerabilities in later versions of OpenSSH have been integrated into the sunssh implementation of Secure Shell (SunSSH), as are individual bug fixes and features.
ssh , scp umask
For the love of God, does anyone know how to set the umask of SSH and in turn scp.
I have tried every thing..... the various files in the ssh profile... the adding of umask in the config files, hopping on one leg, and even as a last resort dressing up as elvis and performing a juggling act whilst on a uni cycle...
[root@localhost .ssh]# pwd
/root/.ssh
[root@localhost .ssh]# ls -l
total 16
-rwx------ 1 root root 19 Apr 25 16:11 environment
-rw-r--r-- 1 root root 3837 Apr 25 15:48 known_hosts
-rwxr-xr-x 1 root root 19 Apr 25 16:08 rc
[root@localhost .ssh]# cat environment rc
/usr/bin/umask 755
/usr/bin/umask 755
[root@localhost .ssh]#
I have tried every thing..... the various files in the ssh profile... the adding of umask in the config files, hopping on one leg, and even as a last resort dressing up as elvis and performing a juggling act whilst on a uni cycle...
[root@localhost .ssh]# pwd
/root/.ssh
[root@localhost .ssh]# ls -l
total 16
-rwx------ 1 root root 19 Apr 25 16:11 environment
-rw-r--r-- 1 root root 3837 Apr 25 15:48 known_hosts
-rwxr-xr-x 1 root root 19 Apr 25 16:08 rc
[root@localhost .ssh]# cat environment rc
/usr/bin/umask 755
/usr/bin/umask 755
[root@localhost .ssh]#
Umask 022
So we're trying to set up an ssh server for a client that automatically applies a umask to a directory that allows for all uploaded files to automatically take on 002.
We can't use ACL's for this since it's an NSF4 mount point and NFS4_acl is not working for some reason.
Here is what we've tried.
Creating a custom login shell that forces umask 002 and putting it in /bin/set-umask. I am able to sftp in but when I put a file up to the server it uploads it in mode 0644 so that doesn't work.
I tried setting in openssh to force -u 002.
We're using subsystem sftp internal-sftp by the way.
Adding a -u 002 does not work for whatever reason. openSSH version is 5.3. OS version is rhel6.
We tried adding in pam.d/login pam.d/sshd to force umask using
session optional umask.so umask=002
This also does not work.
Basically we need for this to work. We are not allowing the sftp users to have an interactive shell so .profile, .bashrc, .bash_profile are not options and we don't want to set it system wide as it will mess with regular ssh users.
Does anyone have any advice on the best way to get this working?
We can't use ACL's for this since it's an NSF4 mount point and NFS4_acl is not working for some reason.
Here is what we've tried.
Creating a custom login shell that forces umask 002 and putting it in /bin/set-umask. I am able to sftp in but when I put a file up to the server it uploads it in mode 0644 so that doesn't work.
I tried setting in openssh to force -u 002.
We're using subsystem sftp internal-sftp by the way.
Adding a -u 002 does not work for whatever reason. openSSH version is 5.3. OS version is rhel6.
We tried adding in pam.d/login pam.d/sshd to force umask using
session optional umask.so umask=002
This also does not work.
Basically we need for this to work. We are not allowing the sftp users to have an interactive shell so .profile, .bashrc, .bash_profile are not options and we don't want to set it system wide as it will mess with regular ssh users.
Does anyone have any advice on the best way to get this working?