500 Internal Server Error (ngnix)

djav

Гуру форума
Регистрация
3 Апр 2008
Сообщения
120
Реакции
51
При попытки изменить файл в ispManger появляется 500 Internal Server Error, лог ниже
Код:
2013/04/14 19:57:48 [crit] 1198#0: *103 open() "/var/lib/nginx/tmp/proxy/2/00/0000000002" failed (13: Permission denied) while reading upstream, client: 178.154.243.92, server: site.ru, request: "GET /page/box2.php?page=product&id=9097 HTTP/1.1", upstream: "http://46.38.48.137:81/page/box2.php?page=product&id=9097", host: "site.ru"
2013/04/14 19:58:01 [crit] 1198#0: *65 open() "/var/lib/nginx/tmp/client_body/0000000003" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=259"
2013/04/14 19:58:05 [crit] 1198#0: *93 open() "/var/lib/nginx/tmp/proxy/4/00/0000000004" failed (13: Permission denied) while reading upstream, client: 178.251.136.49, server: 46.38.48.137, request: "GET /manager/ispmgr?func=file.edit&elid=aquota.user&operafake=506 HTTP/1.1", upstream: "http://46.38.48.137:1500/manager/ispmgr?func=file.edit&elid=aquota.user&operafake=506", host: "site.ru", referrer: "https://site.ru/manager?startpage=user"
2013/04/14 19:58:38 [crit] 1198#0: *93 open() "/var/lib/nginx/tmp/client_body/0000000005" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=var&operafake=174"
2013/04/14 20:16:18 [crit] 1198#0: *279 open() "/var/lib/nginx/tmp/client_body/0000000006" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=100"
2013/04/14 20:23:09 [crit] 1198#0: *331 open() "/var/lib/nginx/tmp/proxy/7/00/0000000007" failed (13: Permission denied) while reading upstream, client: 66.249.76.50, server: site.ru, request: "GET /doc/declar_8722.doc HTTP/1.1", upstream: "http://46.38.48.137:81/doc/declar_8722.doc", host: "www.site.ru"
2013/04/14 20:24:40 [crit] 1198#0: *318 open() "/var/lib/nginx/tmp/client_body/0000000008" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=46"
2013/04/14 20:25:44 [crit] 1198#0: *395 open() "/var/lib/nginx/tmp/client_body/0000000009" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=416"
2013/04/14 20:26:21 [crit] 2059#0: *2 open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=842"
2013/04/14 20:27:58 [crit] 2059#0: *7 open() "/var/lib/nginx/tmp/client_body/0000000002" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=872"
2013/04/14 20:29:02 [crit] 2059#0: *36 open() "/var/lib/nginx/tmp/client_body/0000000003" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=833"
2013/04/14 20:31:53 [crit] 2368#0: *2 open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=434"
2013/04/14 20:35:15 [crit] 2368#0: *31 open() "/var/lib/nginx/tmp/client_body/0000000002" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=543"
2013/04/14 20:35:26 [crit] 2368#0: *41 open() "/var/lib/nginx/tmp/proxy/3/00/0000000003" failed (13: Permission denied) while reading upstream, client: 178.251.136.49, server: 46.38.48.137, request: "GET /manager/ispmgr?func=file.edit&elid=access.log&plid=var%2Flog%2Fnginx&operafake=217 HTTP/1.1", upstream: "http://46.38.48.137:1500/manager/ispmgr?func=file.edit&elid=access.log&plid=var%2Flog%2Fnginx&operafake=217", host: "site.ru", referrer: "https://site.ru/manager?startpage=user"
2013/04/14 20:38:44 [crit] 2368#0: *41 open() "/var/lib/nginx/tmp/client_body/0000000004" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=109"
2013/04/14 20:40:52 [crit] 2368#0: *106 open() "/var/lib/nginx/tmp/client_body/0000000005" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=601"
2013/04/14 20:41:18 [crit] 2817#0: *2 open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=414"
2013/04/14 20:41:57 [crit] 2817#0: *10 open() "/var/lib/nginx/tmp/client_body/0000000002" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=111"
2013/04/14 20:42:22 [crit] 2817#0: *20 open() "/var/lib/nginx/tmp/client_body/0000000003" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=683"
2013/04/14 20:43:03 [crit] 2817#0: *25 open() "/var/lib/nginx/tmp/client_body/0000000004" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=389"
2013/04/14 20:43:06 [crit] 2817#0: *35 open() "/var/lib/nginx/tmp/proxy/5/00/0000000005" failed (13: Permission denied) while reading upstream, client: 178.251.136.49, server: 46.38.48.137, request: "GET /manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=313 HTTP/1.1", upstream: "http://46.38.48.137:1500/manager/ispmgr?func=file.edit&elid=proftpd.conf&plid=etc&operafake=313", host: "site.ru", referrer: "https://site.ru/manager?startpage=user"
2013/04/14 20:51:57 [crit] 2817#0: *103 open() "/var/lib/nginx/tmp/proxy/6/00/0000000006" failed (13: Permission denied) while reading upstream, client: 66.249.76.50, server: site.ru, request: "GET /doc/declar_8546.doc HTTP/1.1", upstream: "http://46.38.48.137:81/doc/declar_8546.doc", host: "www.site.ru"
2013/04/14 20:53:49 [crit] 2817#0: *88 open() "/var/lib/nginx/tmp/client_body/0000000007" failed (13: Permission denied), client: 178.251.136.49, server: 46.38.48.137, request: "POST /manager/ispmgr HTTP/1.1", host: "site.ru", referrer: "https://site.ru/manager/ispmgr?func=file.edit&elid=proftpd.conf&operafake=821"

При том что некоторые файлы он дает нормально сохранить, а некоторые нет.

Я знаю что проблема в правах доступа.
Прошу помочь какие права должны быть.
Иерархия папок (права:владелец:группа)
/var (755:root:root)
/var/lib(755:root:root)
/var/lib/ngnix(755:ngnix:root)
/var/lib/ngnix/tmp(770:ngnix:root)
В папке tmp находятся 4 папки (client_body fastcgi proxy scgi uwsgi) с правами (770:apache:root) пробовал и выставить права (770:ngnix:root) результат тот же
500 Internal Server Error
 
Права верно выставленные.Попробуйте изменить файл через клиент ssh
 
Вопрос решен, у кого такая же проблема будет, зайдите в конфиг Для просмотра ссылки Войди или Зарегистрируйсяetc/nginx/ngnix.conf найдите такую строку: user apache;worker_processes 2; ngnix запускается от имени apache, соответственно владелец папок должен быть apache.
<-------------- добавлено через 40 сек. -------------->
Права верно выставленные.Попробуйте изменить файл через клиент ssh
через ssh нормально меняется.... но туда все время лезть не всегда хочется.
 
Вопрос решен, у кого такая же проблема будет, зайдите в конфиг Для просмотра ссылки Войди или Зарегистрируйсяetc/nginx/ngnix.conf найдите такую строку: user apache;worker_processes 2; ngnix запускается от имени apache, соответственно владелец папок должен быть apache.
<-------------- добавлено через 40 сек. -------------->

через ssh нормально меняется.... но туда все время лезть не всегда хочется.
Та же хрень. После обновления вылезла:
500 Internal Server Error
nginx/1.10.1

Как пофиксить?

[root@server nginx]# ls -l -R
.:
total 4
drwx------ 7 apache root 4096 Sep 11 14:47 tmp

./tmp:
total 20
drwxr-xr-x 2 apache apache 4096 Sep 11 14:45 client_body
drwx------ 2 apache root 4096 Sep 11 14:47 fastcgi
drwx------ 2 apache root 4096 Sep 11 14:47 proxy
drwx------ 2 apache root 4096 Sep 11 14:47 scgi
drwx------ 2 apache root 4096 Sep 11 14:47 uwsgi

./tmp/client_body:
total 0

./tmp/fastcgi:
total 0

./tmp/proxy:
total 0

./tmp/scgi:
total 0

./tmp/uwsgi:
total 0
 
chown -R apache:apache /var/lib/nginx пофиксило ошибку
 
Назад
Сверху