Permission denied: mod_fcgid: couldn’t bind unix domain socket in cPanel

Posted: 0p in Linux

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

———–

 

Advertisements
Comments
  1. simon says:

    thanks, this worked for me too!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s