Linux – How to set umask for php-fpm in Fedora

fedoralinuxphp-fpmsystemdumask

I cannot find where to set umask (to set proper permissions to files created by php scripts)
in Fedora 19. (specifically, I want new files to have the permissions 664)

Best Answer

Here's how I finally did it, in case this helps someone:

Create the file

/etc/systemd/system/php5-fpm.service.d/php5-fpm.service.conf

(it must end in .conf) with the content:

.include /lib/systemd/system/php5-fpm.service

[Service]
UMask=0002

Then run

 systemctl daemon-reload
 systemctl restart php5-fpm