umask help

Cameron Simpson cs at zip.com.au
Tue Feb 24 20:37:02 UTC 2004


On 18:24 24 Feb 2004, Kieran Hood <k_hood at ntlworld.com> wrote:
| I want to make it so that all new files created in users home directories 
| are only readable by the users who own them an their groups. Is umask the 
| best way to do this? Also where do I add the command so that it is 
| executed on startup? Thanks

Yes. Put this:

	umask 027

in the global start up, eg by making a file:

	/etc/profile.d/local.sh

and putting it in there.

The above umask will turn of group-write and other-everything.
This results in files with permissions 640 (rw-r-----) and dirs 750
(rwxr-x---) which sounds like what you want.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Computer manufacturers have been failing to deliver working systems on
time and to budget since Babbage.       - Jack Schofield, in The Guardian





More information about the redhat-list mailing list