Добрый вечер,
имею: Centos 7, nginx, php-fpm72, percona, opensips 3.0
Пробую установить web панель к opensips, столкнулся с проблемой в том что логин и пароль не подходят(сверил даже из хеши все верно) Включив логи в php увидел что есть проблема с доступом к директори с сессиями:
2020/01/16 17:13:18 [error] 6677#0: *4529 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): open(/var/nginx/session/sess_ctjmdlpq0v8oo2os5dp4j4c459, O_RDWR) failed: Permission denied (13) in /var/www/domains/opensips-cp/web/main.php on line 22
PHP message: PHP Warning: session_start(): Failed to read session data: files (path: /var/nginx/session) in /var/www/domains/opensips-cp/web/main.php on line 22" while reading response header from upstream, client: CLIENTIP, server: opensips.com, request: "GET /main.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php72-fpm.sock:", host: "SERVERIP, referrer: "SERVERIP/index.php?err=1"
2020/01/16 17:16:08 [error] 6676#0: *4553 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): open(/var/nginx/session/sess_11ti4a0q8dj6ip1uaioolk2leu, O_RDWR) failed: Permission denied (13) in /var/www/domains/opensips-cp/web/login.php on line 22
PHP message: PHP Warning: session_start(): Failed to read session data: files (path: /var/nginx/session) in /var/www/domains/opensips-cp/web/login.php on line 22" while reading response header from upstream, client: CLIENTIP server: opensips.com, request: "POST /login.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php72-fpm.sock:", host: "SERVERIP", referrer: "SERVERIP/index.php?err=1"
2020/01/16 17:16:09 [error] 6676#0: *4553 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): open(/var/nginx/session/sess_gav4f11garfmh3vgcnh7h7s9u7, O_RDWR) failed: Permission denied (13) in /var/www/domains/opensips-cp/web/main.php on line 22
PHP message: PHP Warning: session_start(): Failed to read session data: files (path: /var/nginx/session) in /var/www/domains/opensips-cp/web/main.php on line 22" while reading response header from upstream, client: CLIENTIP, server: opensips.com, request: "GET /main.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php72-fpm.sock:", host: "SERVERIP", referrer: "SERVERIP/index.php?err=1"
nginx работает от юзера nginx:
ps aux
nginx 10550 0.0 0.1 121416 3372 ? S 16:24 0:00 nginx: worker process
php-fpm от root
ps aux
root 10595 0.0 0.7 365568 13308 ? Ss Jan15 0:06 php-fpm: master process (/etc/opt/remi/php72/php-fpm.conf)
Сессии пробую ложить в /var/nginx:
ls -la /var/nginx
drw-rw-rw- 2 nginx nginx 6 Jan 16 16:52 session
Пробовал давать права 777 /var/nginx/session/ но безрезультатно, что я упускаю?
раздел session в phpinfo():
Session Support enabled
Registered save handlers files user
Registered serializer handlers php_serialize php php_binary
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly 1 1
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure 1 1
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.lazy_write On On
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/nginx/session /var/nginx/session
session.serialize_handler php php
session.sid_bits_per_character 5 5
session.sid_length 26 26
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies 1 1
session.use_only_cookies 1 1
session.use_strict_mode 0 0
session.use_trans_sid 0
Любую нужную информацию предоставлю максимально оперативно...