umask dilemma

Marius Gedminas marius at
Fri Jan 12 18:00:27 UTC 2007

On Fri, Jan 12, 2007 at 06:20:57PM +0100, Dieter Schicker wrote:
> I want to set file mask to 660 and directory mask to 770 for all my
> users on a certain machine. I don't want to play with /etc/login.defs
> and /etc/bashrc.bashrc etc ... So I tried libpam-umask with the
> following /etc/pam.d/common-session:
> session required umask=006

You want to set the umask to 007, otherwise directories will get mode
771 instead of 770.

> session sufficient
> session required
> Well, nothing happens. If I create a file, it gets 644. Tried all kind
> of combinations with absolutely no success ...

Probably the 'umask 022' in /etc/profile overrides your pam_umask
setting.  Remove it from /etc/profile and try again.

Marius Gedminas
EMACS is a good OS.  The only thing it lacks is a decent text-editor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the ubuntu-users mailing list