일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Redis
- deep learning
- mariadb
- Redux
- React
- Node
- Go
- nginx
- Switch
- phpredis
- AWS
- python
- javascript
- 블레이드 템플릿
- CentOS
- For
- php
- Babel
- nodejs
- fastapi
- Backbone.js
- NCP
- laravel
- linux
- Machine Learning
- webpack
- SQL
- 기초 수학
- rabbitmq
- docker
- Today
- Total
개발일기
PHP - connect() to unix:/run/php/php-fpm.sock failed (13: Permission denied) 본문
PHP - connect() to unix:/run/php/php-fpm.sock failed (13: Permission denied)
Flashback 2023. 4. 21. 23:071. 원인
php-fpm의 www.conf에 설정된 사용자와 그룹명이 제대로 지정되지않았기 때문에 발생하는 에러다. php-fpm을 실행시키킬 권한을 가진 사용자로 변경하면 된다.
2. 해결법
# nano /etc/php/php버전/fpm/pool.d/www.conf
# vi /etc/php/php버전/fpm/pool.d/www.conf
# vim /etc/php/php버전/fpm/pool.d/www.conf
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
주석되어있는 부분은 해제하고(주석표시 ;) 위와같이 변경한다.
www-data는 Ubuntu의 기본 설정 사용자이므로 www-data로 변경하면 php-fpm을 실행할 수 있다.
systemctl restart php-fpm
www.conf 파일을 변경한 후, php-fpm을 재시작해야 한다.
참고 사이트 :
https://askubuntu.com/questions/873839/what-is-the-www-data-user
What is the www-data user?
I'm working through How To Serve Django Applications with uWSGI and Nginx on Ubuntu 16.04. At the end of the "Create a systemd Unit File for uWSGI" in the article they discuss the www-data user. W...
askubuntu.com
https://serverfault.com/questions/777994/permission-denied-for-fastcgi-pass-using-php7
Permission Denied for fastcgi_pass using PHP7
I'm running LEMP with PHP7.0. I've got this in my server block fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; But when I open the site, it returns a 502 Bad Gateway. Below is the error log. *1
serverfault.com
nginx error connect to php5-fpm.sock failed (13: Permission denied)
I update nginx to 1.4.7 and php to 5.5.12, After that I got the 502 error. Before I update everything works fine. nginx-error.log 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/...
stackoverflow.com
'프로그래밍 언어 > PHP - Laravel' 카테고리의 다른 글
PHP - 터미널에서 PHP파일 실행하기 (0) | 2024.04.13 |
---|---|
Laravel - ../vendor/autoload.php): Failed to open stream: No such file or directory in (0) | 2023.04.21 |
Laravel - Laravel Forge: file_put_contents(): failed to open stream: Permission denied (0) | 2022.09.02 |
Laravel - slug url 생성 (0) | 2022.08.20 |
Laravel - Schedule 예약 작업 실행 (0) | 2022.08.13 |