Fekete Tamás wrote: > I use wheezy 7.8 on x86_64 architecture and I'm simply unable to modify the > umask settings of the system. I have read many webpages for solution (even > helps specified for debian) but didn't find the answer what to do. > > Now, my umask is the default umask: 0022. I want it to be 0077.
Wow. That is very restrictive. Are you sure you need such setting? > I took two steps to modify this variable. The first that I have edit > /etc/login defs. I rewrite the UMASK part of the file to look like this: > UMASK 077 Much chaos exists surrounding how to set umask by the system for users. In Etch 4 there was major changes. In Squeeze 6 there were more changes. Therefore one must be careful looking at documentation to make sure the docs match the version of Debian they are currently using. /etc/login.defs is the old Debian way from before Etch 4. With varying age and applicability here is a collection of references through time in Debian that I have collected apply on umask. http://wiki.debian.org/DebianDesktopHowTo https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646692 http://lists.debian.org/debian-devel/2005/06/msg01598.html http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336214 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314539 > My second step was to edit /etc/pam.d/common-session. I add a last line to > the: > #and here are moe per-package modules part of the file. The line is looking > like this: > session optional pam_umask.so umask = 0077 Are there really spaces around the equals sign? I believe that needs to be passed as one argument. session optional pam_umask.so umask=0077 > The umask settings are not modified even if I am in gnome, or in normal > shell. > If you have any advice or good knowledge what is still missing to work, > please share! I haven't updated this for either Wheezy or Jessie so beware that I might be stale but my latest notes on setting umask say add this to the /etc/pam.d/common-session file: session optional pam_umask.so umask=002 Most people normally want 02 for general use. If you want 077 that is okay but not for general purpose use. Bob
signature.asc
Description: Digital signature