Permission denied: mod_fcgid: couldn’t bind unix domain socket in cPanel
After changing PHP 5 Handler to fcgi mode in cPanel, I have faced Permission denied: mod_fcgid error.
# tail -f /usr/local/apache/logs/error_logs
[warn] (13)Permission denied: mod_fcgid: spawn process /usr/local/cpanel/cgi-sys/php5 error
[error] (13)Permission denied: mod_fcgid: couldn’t bind unix domain socket /usr/local/apache/logs/fcgidsock
The result of following command will be null in this case.
root@ [~]# netstat -plan | grep fcgi
Solution:
Change permission of ‘fcgidsock’ directory to 777 to solve the issue.
root@ [~]# cd /usr/local/apache/logs/
root@ [~]# chmod 777 fcgidsock
Check the error logs again to verify whether the issue is fixed. If fcgi is running fine, you will get a result like following for the ‘netstat’ command.
root@ [~]# netstat -plan | grep fcgi
unix 2 [ ACC ] STREAM LISTENING 3444246213 11517/php /usr/local/apache/logs/fcgidsock/10411.116
unix 2 [ ACC ] STREAM LISTENING 3444100964 10580/php /usr/local/apache/logs/fcgidsock/10411.17
unix 2 [ ACC ] STREAM LISTENING 3444247414 11536/php /usr/local/apache/logs/fcgidsock/10411.117
unix 2 [ ACC ] STREAM LISTENING 3444248312 11560/php /usr/local/apache/logs/fcgidsock/10411.118
unix 2 [ ACC ] STREAM LISTENING 3444100985 10583/php /usr/local/apache/logs/fcgidsock/10411.18
———–
thanks, this worked for me too!