# Is CHEF-686 back from the dead? (umask problem)

**URL:** <https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722>\
**Category:** Chef Infra (archive)\
**Created:** [February 7, 2011, 9:48pm UTC](https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722 "2011-02-07T21:48:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Olivier\_Lamey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eric_olivier_lamey/32/276_2.png) [@Eric\_Olivier\_Lamey](https://discourse.chef.io/u/Eric_Olivier_Lamey)\
**Post date:** [February 7, 2011, 9:48pm UTC](https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722/1 "2011-02-07T21:48:04Z")

</div>

Hi everyone,

I am seeing umask problems on a test chef install and, before  
reopening CHEF-686, I wanted to try to understand if this comes  
from my own mistake or if the umask setting code has been lost  
since 0.7.16.

I have installed chef 0.9.12 from my own RPMs (which I built for  
ruby 1.9.2, which I also package) on CentOS 5.5 x86\_64. All the  
files and directories created by chef-server and chef-server-webui  
are world-writable. As per CHEF-686, I tried to change the umask  
in merb-core (lib/merb-core/server.rb) and the problem goes away,  
but this is not a real fix. I see that chef is setting its umask in  
lib/chef/daemon.rb but I don’t see where this code is called. The  
fix for CHEF-686 was applied at the time to chef-server/config/init.rb  
and has since disappeared.

Since I am using my own ruby and chef install, I wanted to check  
if anyone has the same problem before opening a ticket on JIRA.

Thanks.

–  
Eric-Olivier Lamey

---

<div class="post-metadata">

**Author:** ![Eric\_Olivier\_Lamey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eric_olivier_lamey/32/276_2.png) [@Eric\_Olivier\_Lamey](https://discourse.chef.io/u/Eric_Olivier_Lamey)\
**Post date:** [February 12, 2011, 4:19pm UTC](https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722/2 "2011-02-12T16:19:42Z")

</div>

On Mon, Feb 7, 2011 at 10:48 PM, Eric-Olivier Lamey [eolamey@gmail.com](mailto:eolamey@gmail.com) wrote:

> Hi everyone,
> 
> I am seeing umask problems on a test chef install and, before  
> reopening CHEF-686, I wanted to try to understand if this comes  
> from my own mistake or if the umask setting code has been lost  
> since 0.7.16.

Hi,

Has anyone seen the same problem as I have? Do you have any log  
file, cache or generated certificate which are world writable permission?

If I add  
File.umask Chef::Config[:umask]  
at the end of "config/init.rb" for chef-server-api and chef-server-webui,  
the problem is fixed.

Thank you.

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [February 12, 2011, 7:04pm UTC](https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722/3 "2011-02-12T19:04:47Z")

</div>

On Saturday, February 12, 2011 at 8:19 AM, Eric-Olivier Lamey wrote:  
On Mon, Feb 7, 2011 at 10:48 PM, Eric-Olivier Lamey [eolamey@gmail.com](mailto:eolamey@gmail.com) wrote:

> > Hi everyone,
> > 
> > I am seeing umask problems on a test chef install and, before  
> > reopening CHEF-686, I wanted to try to understand if this comes  
> > from my own mistake or if the umask setting code has been lost  
> > since 0.7.16.
> 
> Hi,
> 
> Has anyone seen the same problem as I have? Do you have any log  
> file, cache or generated certificate which are world writable permission?
> 
> If I add  
> File.umask Chef::Config[:umask]  
> at the end of "config/init.rb" for chef-server-api and chef-server-webui,  
> the problem is fixed.
> 
> Thank you.  
> If you can reliably reproduce this behavior and you have a fix, please reopen the ticket and include this information.

Thanks,

--  
Dan DeLeo

---

<div class="post-metadata">

**Author:** ![Eric\_Olivier\_Lamey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eric_olivier_lamey/32/276_2.png) [@Eric\_Olivier\_Lamey](https://discourse.chef.io/u/Eric_Olivier_Lamey)\
**Post date:** [February 14, 2011, 8:13am UTC](https://discourse.chef.io/t/is-chef-686-back-from-the-dead-umask-problem/1722/4 "2011-02-14T08:13:44Z")

</div>

On Sat, Feb 12, 2011 at 8:04 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> Has anyone seen the same problem as I have? Do you have any log  
> file, cache or generated certificate which are world writable permission??
> 
> If I add  
> File.umask Chef::Config[:umask]  
> at the end of "config/init.rb" for chef-server-api and chef-server-webui,  
> the problem is fixed.
> 
> Thank you.
> 
> If you can reliably reproduce this behavior and you have a fix, please  
> reopen the ticket and include this information.  
> Thanks,

Hi,

I can reproduce the problem but I just noticed my fix was not good  
enough. Some files are still created with the wrong rights.

I'll look into it and try to submit a patch.
