Setting up fastcgi on an Ubunutu server (socket file permissions issue)

Posted by gray alien on Ask Ubuntu See other posts from Ask Ubuntu or by gray alien
Published on 2011-02-13T09:34:19Z Indexed on 2011/02/14 7:33 UTC
Read the original article Hit count: 180

Filed under:
|

I am trying to set up mod_fcgid on my server. Part of the requirement is that Apache needs to create a socket file for mod_fcgid.

I specified the folder for Apache to write the socket data to:

/var/run/apache2/fcgid

I then specified this file in my fcgid.conf file as follows:

SocketPath /var/run/apache2/fcgid/sock

I then changed the owner of the folder to www-data (the apache user) and gave the owner full permissions to the folder and its contents.

I was able to run my test fcgi app then.

When I rebooted the machine, y fastcgi app no longer worked. After some investigation, I found that ownership of /var/run/apache2/fcgid has been reset to root, and with permission reset to 700

I have the following questions:

  • Is there something specific about the /var/run folder?
  • why is the permissions being reset after a reboot?
  • Should I move my socket file to another location (in case root automatically takes ownership of contents in this folder for security reasons?)

I am running Ubuntu 10.0.4 LTS 64 bit

© Ask Ubuntu or respective owner

Related posts about security

Related posts about permissions