ОС Linux Mint 15. Настроил nginx и php-fpm. Создал тестовый хост:
server {
server_name test;
root /home/username/www/test;
location / {
index index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
При открытии этого хоста в браузере пишет 403 Forbidden. Содержимое лога /var/log/nginx/error.log
2013/11/21 12:21:40 [error] 16392#0: *41 "/home/username/www/test/index.php" is forbidden (13: Permission denied), client: 127.0.0.1, server: test, request: "GET / HTTP/1.1", host: "test"
Права на папку и вложенные в нее файлы и папки 777 www-data:www-data
username-K56CB username # stat ./www
File: ‘./www’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 18h/24d Inode: 26476735 Links: 4
Access: (0777/drwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2013-11-21 12:11:12.411861799 +0200
Modify: 2013-11-21 11:50:18.171851277 +0200/etc/nginx/sites-available/test
Change: 2013-11-21 12:10:25.979861409 +0200
Birth: -
Есть одна особенность, при установке Mint я указал "Encrypt my home folder", может быть это из-за того что домашняя папка зашифрована? Хотя через nemo и консоль она нормально открывается.
При этом если переместить этот index.php в папку /var/www/test/index.php, поставить на него права 777 www-data:www-data и прописать новый путь в конфиге хоста /etc/nginx/sites-available/test то он начинает работать.
NGINX - не работает хост - Permission denied
Модераторы: Trinity admin`s, Free-lance moderator`s
-
- Junior member
- Сообщения: 1
- Зарегистрирован: 22 мар 2019, 01:56
- Откуда: Ireland
- Контактная информация:
-
- Junior member
- Сообщения: 4
- Зарегистрирован: 22 мар 2019, 05:19
- Откуда: Egypt
- Контактная информация:
NGINX не работает хост Permission denied
Hi Michael,
Thank you for the reply. Its working well when i copy the files from one machine to another machine using a USB. But My requirement is to run the file in USB without doing copy in Destination machine. when i try to do the execution from USB getting permission denied error. Any work around please?
Thank you for the reply. Its working well when i copy the files from one machine to another machine using a USB. But My requirement is to run the file in USB without doing copy in Destination machine. when i try to do the execution from USB getting permission denied error. Any work around please?
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 1 гость