voxpupuli / voxpupuli/puppet-php
Allow setting umask of php-fpm process
Nobody has claimed this yet.
- Dominant language
- Puppet
- Stars
- 86
- Forks
- 264
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
We need to set the umask of the php-fpm process to '002' instead of the default '022', to allow PHP applications to create files that are group-writable. On Ubuntu we'd normally enable this by creating an /etc/init/php7.1-fpm.override file for Upstart, with contents umask 002. This ensures the umask command is executed before the php-fpm process is started.
Unfortunately the php module also manages this file, with fixed contents reload signal USR2 and doesn't allow any additional lines. See:
https://github.com/voxpupuli/puppet-php/blob/cd98f6111e1c4901c5de96e1bdb02ef3381b90dc/manifests/fpm.pp#L111
Since the file is managed by the module we can't use a file or file_line resource to add the umask line ourselves. If we do, the module simply overwrites it again.
It would therefore be great to have an optional parameter that allows us to provide our own string or template for this file. I'm not sure how other distributions would manage such an override so I don't know how useful a pull-request for this Upstart-specific file would be.
Perhaps it would be simplest to make management of that file optional. That would at least allow us to overwrite it in a profile.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting manifests/fpm.pp around the referenced Upstart override file and how platform-specific PHP-FPM configuration is managed. Determine how optional management or custom contents should work for Ubuntu without disrupting other distributions, then verify that the generated override applies umask 002 before php-fpm starts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, ubuntu
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100