Reputation: 51
I have a problem with the permissions of the files generated by my web server : nginx. When a client uploads files on the server, it has 644 permission (with user/group : apache:apache). But this file have to be modified by a designer (who is a member of apache group), but with 644 permissions it's no possible. I have to change manually (or with a script) the files permissions every minutes.
How can I change the umask of the files created ? from 644 to 664 for example. I don't know how to do that. I have tried to change the umask of the system but it doesn't work for the files created by my webserver so ... can you help me ?
(Sorry for my bad english, i'm french :/ )
Thanks in advance
Upvotes: 3
Views: 1760
Reputation: 51
I found the solution. I post it here, it could help other persons in the future.
So, I have modify /etc/sysconfig/php-fpm to add :
umask 0002
also add the line
. /etc/sysconfig/php-fpm
in /etc/init.d/php-fpm
then restart php-fpm
It works !
Upvotes: 2