Skip to content
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

Allow for management of file and directory permissions #825

Closed
jplindquist opened this issue Oct 6, 2017 · 6 comments
Closed

Allow for management of file and directory permissions #825

jplindquist opened this issue Oct 6, 2017 · 6 comments
Assignees

Comments

@jplindquist
Copy link
Contributor

jplindquist commented Oct 6, 2017

Description of problem

  • $dir_mode and $file_mode are both initialized, and set to their respective defaults depending on the OS here. This could be improved upon by having a configurable option within the class which defaults to the same values if not explicitly defined so it's backwards compatible. This would allow users to explicitly manage their own dir and file permissions to line up with other types of management systems where applicable (i.e. rpm packages).

Command used and debugging output

  • N/A, but as an example of our workflow or use case, we have both team and enterprise packages that are installed on top of of the Sensu client package. These additional packages install plugins and checks that run on each system. Any time there is an update to these packages and Puppet runs, it overwrites the owner, group and mode on the files which results in a system change during every run which can be noisy at times.

Platform and version information

  • Your OS: CentOS 7
  • Your Ruby version: Embedded, Ruby 2.4
  • Your version of Puppet: 5
  • Your version of Sensu: sensu-0.26.5-2.x86_64
  • Your version of this module: 33e0ff3, but this appears to be the same in the latest version as well, which we're trying to move to.

Anything else to add that you think will be helpful?

I'd be happy to submit a PR if this would be something that would be worthwhile.

@jplindquist jplindquist changed the title Allow for managenebt file and directory permissions Allow for management of file and directory permissions Oct 6, 2017
@alvagante
Copy link
Collaborator

@jplindquist I'm always in favour of modules "extreme" reusability (so that users don't have to fork them to be able to fit more or less special use cases) so I think a PR with updated docs and tests would be welcomed, what do you think @ghoneycutt ?

@ghoneycutt
Copy link
Collaborator

@jplindquist Thank you for submitting this!

I would like the sensu package to handle that with regards to the files it manages under /opt/sensu, so I would not want to do any kind of recursion through that.

Allowing people to specify their own defaults for /opt/sensu, /etc/sensu, etc would certainly be welcomed. The default values should be default for the whole module and not OS specific and should align with what is currently done with the sensu package.

@ghoneycutt
Copy link
Collaborator

@jplindquist Are you still interested in submitting a PR?

@jplindquist
Copy link
Contributor Author

Yeah, sorry. Got distracted and busy with the holidays. Planning to get back to this soon

@ghoneycutt
Copy link
Collaborator

Just doing some house cleaning on the outstanding issues. Your contributions are most welcome and we look forward to adding this support!

@ghoneycutt
Copy link
Collaborator

Released in v2.49.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants