Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to figure out the proper location to set daemon umasks in RedHat 5. All my searches lead to setting it in /etc/init.d/functions or /etc/sysconfig/init.

What are the pros/cons of setting the umask in one place over another? Is one location more secure than the other?

share|improve this question
up vote 1 down vote accepted

I would set it in /etc/sysconfig/init because that gets sourced later on in the .etc/init.d/functions script than the explicit umask command does and as such it takes precedence.

Not to mention /etc/init.d/functions is a script file whereas /etc/sysconfig/init is a configuration file. Scripts may be updated by rpm but newer config files just get saved as configFileName.rpmnew. So if you change it in functions, an update may things cause things to start breaking and it will be non-intuitive to figure out why.

share|improve this answer
Thanks Joel, makes sense! – chirinosky Apr 24 '13 at 16:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.