Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

It's possible to force any ssh type connection to have a umask of 0777 using pam. This is what I have:

# /etc/pam.d/ssh
sesssion required pam_umask.so umask=0777

I want to do this only for a certain user/group. I've read that pam_umask is capable of this, but I've not been able to figure out how.

share|improve this question

1 Answer 1

It won't work for non-login sessions, but I've always taken the approach of modifying the user's .bash{rc,profile}. Failing that, you can do the opposite: set umask to 0777 with pam, and then change that further for login sessions in global bashrc.

That said, a umask of 0777 is alarming. You realize this means your users will create files with a mode of 0000--that is, no access for anyone--right?

share|improve this answer
    
Yup, I realize that. It has to be for non-login sessions. I want the default umask for login sessions. –  MTeck Apr 27 '12 at 19:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.