UMASK – What Permissions Change When UMASK is Set to 027 from 022?

lynispermissionsumask

I have just started using Lynis (please don't think I have misspelled Linux). After running it, I was suggested to set umask in /etc/login.defs and /etc/init.d/rc to 027 than the default 022.

I want to know what changes that would make to file permissions. Also why is the value stored in two files? Do they work differently?

For more info if necessary, I use Ubuntu 12.10, and I am the only user of the system.

Best Answer

The 027 umask setting means that the owning group would be allowed to read the newly-created files as well. This moves the permission granting model a little further from dealing with permission bits and bases it on group ownership.

This will create directories with permission 750.

Please check this great article 027 umask — a compromise between security and simplicity.