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

I have modified /etc/login.defs and set the umask to 002 but it fails to be changed when I exit or logout and log back in. My bashrc file does NOT contain any umask settings.

from /etc/login.defs

#
# Umask which is used by useradd and newusers for creating
# new home directories.
#
UMASK                   002

Any thoughts on why it's not changing? Despite using Samba, the permissions I'm trying to modify are SSH.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

As the comment says: it is used for creating new home directories. The umask to be used normally is somewhere different; probably in /etc/profiles or similiar.

Samba, however, is completely independent of the nrmal umask, which only applies if the user is logged in via shell. Instead, you should have a look in smb.conf's

  • create mask
  • directory mask
  • directory security mask
  • force create mode
  • force directory mode
  • force directory security mode
  • force security mode
  • security mask

(The manpage of smb.conf is very verbose - it has 6632 lines.)

share|improve this answer
    
I've tried modifying it there as well and it had no affect.... we use Samba if that makes a difference –  Webnet Nov 15 '11 at 20:49
1  
I think glglgl is on the right track. Are you setting umask anywhere else, for example in ~/.profile? What if you put a umask in your ~/.bashrc, does that work? –  Phil Hollenback Nov 15 '11 at 21:07
    
edited for adding samba –  glglgl Nov 16 '11 at 7:34

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.