Answer the question
In order to leave comments, you need to log in
Why are file permissions reset after configuring nginx+apache+php-fpm after rebooting debian7.0?
I configure nginx through sockets.
Example from /etc/nginx/sites-available/site1.com.conf
...
location @sside {
root /web/site1.com;
fastcgi_pass unix:/etc/nginx/socket/site1.com.socket;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
[site1.com]
listen = /etc/nginx/socket/site1.com.socket
listen.backlog = -1
; Unix user/group of processes
user = user_site1
group = web_group
srw-rw---- 1 root root 0 Jul 31 13:30 site1.com.socket
2014/07/31 13:14:26 [crit] 2413#0: *1 connect() to unix:/etc/nginx/socket/site1.com.socket failed (13: Permission denied) while connecting to upstream
chmod 777 /etc/nginx/socket/site1.com.socket
chown user_site1:web_group /etc/nginx/socket/site1.com.socket
ls -l /etc/nginx/socket
srwxrwxrwx 1 user_site1 web_group 0 Jul 31 13:30 site1.com.socket
srw-rw---- 1 root root 0 Jul 31 13:30 site1.com.socket
Answer the question
In order to leave comments, you need to log in
The phrase “I create the file /etc/nginx/socket/site1.com.socket” scares me
. PHP-FPM should create it. And in order for him to have the necessary rights, you need to specify something like this in the settings
listen.owner = www-data
listen.group = www-data
listen.mode = 0600
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question