-
-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log directory ownership and permissions do not respect OS #664
Comments
One other option would be to not force creation of it? I think in most cases, the package handles creation of the log directories. |
It seems like on most (all?) platforms, Default: nginx There isn't a direct equivalent that I can see for the group. Would it make sense to use daemon_user as the owner, and maybe make a new parameter for the log group as well? |
I've got a branch that will set this explicitly (and, potentially, also force the mode). However, the existing code doesn't force the owner or mode, and that may be a good thing. The default permissions, based on spec tests, are mode 0644), so I think we'd be seeing a lot of problems if the ownership and permissions were not already coming from the package, rather than from our module. I'm not totally convinced that the module should handle this if it doesn't have to. Also, it seems like different package sources even within the same platform expect different ownership of the log directory and logfiles, for example, on CentOS the official nginx package seems to create the log dir and log files as root:root, but the epel (and possibly the Phusion / passenger) package do nginx:nginx. It does seem like a good idea to force 0751 or 0700 on the directory permissions, though doing so might require adding another configurable knob for end-users who want to set more restrictive permissions. Which platform are you actually seeing this problem come up on, and which version of the nginx package (i.e., which That said, my first pass at this is at: |
Oh right, the File resource has it set to global_owner / global_group in |
#959 is now merged. I would love it if you (or anyone interested) can test this "in the wild" before the next release, otherwise, we may have some angry people on our hands if the behavior isn't as expected on certain platforms. |
The setting up of the $log_dir does not respect the variance in operating systems, and what the owner and group of that directory should be. Currently it is set to
owner => $global_user,
group =>$global_group,
This should vary with different operating systems - for example in Debian/Ubuntu it should be:
owner => 'www-data',
group => 'adm',
The text was updated successfully, but these errors were encountered: