Configuring Nginx / php-fpm umask

When I used apache2 server, by default, umask in / etc / apache 2 / envvars on 0002 used to solve all my permissions problems. Now, when I try to configure nginx / php-fpm, I am facing the same problems when files are created with the wrong permissions.

Is there an umask option in nginx or php-fpm?

+6
source share
2 answers

I managed to solve this for myself by adding umask 0002 to /etc/init/php-fpm.conf ( not /etc/init.d/php-fpm ). See How to track where umask php5-fpm options appear on ubuntu for an explanation.

+1
source

Taken from another answer question:

if you are using systemd [ie Ubuntu 16.04] then edit /lib/systemd/system/php5-fpm.service
And edit the chapter "Service":

 [Service] UMask=0002 
0
source

Source: https://habr.com/ru/post/920980/


All Articles