Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.