Description of problem: yum install mod_fcgid does not create directory /etc/httpd/run/mod_fcgid. This causes httpd to fail to start with the error [Sat May 16 18:16:59 2009] [emerg] (2)No such file or directory: mod_fcgid: Can't create share memory for size %zu byte If the directory is manually created, then httpd starts successfully. Further, if the directory has been created manually, yum erase mod_fcgid fails to remove the directory. Version-Release number of selected component (if applicable): mod_fcgid.i586 0:2.2-10.fc11 How reproducible: Always Steps to Reproduce: 1. yum erase mod_fcgid 2. rm /etc/httpd/run/mod_fcgid 3. yum install mod_fcgid 4. service httpd start Actual results: httpd is not running, and "[Sat May 16 18:16:59 2009] [emerg] (2)No such file or directory: mod_fcgid: Can't create share memory for size %zu byte" appears in the error_log. Expected results: httpd runs successfully Additional info: See bug #500143
The mod_fcgid package requires httpd as a dependency, and that package includes a symlink /etc/httpd/run -> ../../var/run so /etc/httpd/run/mod_fcgid is actually /var/run/mod_fcgid, which is correctly owned by the mod_fcgid package. How have you managed to avoid this?
I have: [root@samson httpd]# ls -l /etc/httpd/run lrwxrwxrwx. 1 root root 19 2009-03-31 01:43 /etc/httpd/run -> ../../var/run/httpd and this is generated from the lines in httpd.spec under %install: # symlinks for /etc/httpd ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs ln -s ../..%{_localstatedir}/run/httpd $RPM_BUILD_ROOT/etc/httpd/run ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules and so /etc/httpd/run/mod_fcgid is actually /var/run/httpd/mod_fcgid I confirm that I do have a directory /var/run/mod_fcgid but the symlinks set out above do not get us there.
Ah, this has changed since F-10: * Thu Jan 22 2009 Joe Orton <jorton> 2.2.11-6 ... - change /etc/httpd/run symlink to have destination /var/run/httpd, and restore "run/httpd.conf" as default PidFile (#478688) ... * Thu Dec 18 2008 Joe Orton <jorton> 2.2.11-3 - update to 2.2.11 - package new /var/run/httpd directory, and move default pidfile location inside there I propose to update mod_fcgid in F-11 onwards to package directory /var/run/httpd/mod_fcgid instead of /var/run/mod_fcgid That should get us back largely to where we were in F-10 and shouldn't need any SELinux policy updates or config file changes.
*** Bug 500143 has been marked as a duplicate of this bug. ***
mod_fcgid-2.2-11.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/mod_fcgid-2.2-11.fc11
mod_fcgid-2.2-11.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mod_fcgid'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-5106
mod_fcgid-2.2-11.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 501931 has been marked as a duplicate of this bug. ***
This is still not quite right. Permissions on /var/run/httpd don't allow apache user to traverse the directory, so mod_fcgid can't create or access anything below that (see bug #502273). $ rpm -q httpd mod_fcgid httpd-2.2.11-8.x86_64 mod_fcgid-2.2-11.fc12.x86_64 $ rpm -qlv httpd | grep var/run lrwxrwxrwx 1 root root 19 Mar 17 14:16 /etc/httpd/run -> ../../var/run/httpd drwx------ 2 root root 0 Mar 17 14:16 /var/run/httpd