PDA

View Full Version : umask 007


Shella
14th May 2008, 12:06
Hi all, i tried to follow instruction to make an hardening on CentOs 5.1 with Bastille.
In the tutorial is suggested to set the umask as 007. Can please somebody explain me the advantages setting this umask in this way please?
If i understood it's work so:

if a file have permission like 0777, with the umask 007 i have back a permission like 770.... right?

If so... why it's suggested to set umask in this way?
Thanks a lot.

falko
15th May 2008, 19:00
Hi all, i tried to follow instruction to make an hardening on CentOs 5.1 with Bastille.
In the tutorial is suggested to set the umask as 007. Can please somebody explain me the advantages setting this umask in this way please?
If i understood it's work so:

if a file have permission like 0777, with the umask 007 i have back a permission like 770.... right?Yes, when you upload a file via FTP, it will have 770 permissions. The umask has no effect on existing files.

If so... why it's suggested to set umask in this way?
770 means that the owner and the group have all permissions for that file, but everyone else has no permissions at all (not even read permissions) - it's a security measure.