I am trying to run httpd (apache) as a different user. I have set the user and group in /etc/httpd/conf/httpd.conf as well as in /etc/php-fpm.d/www.conf (where I also added the user to listen.acl_users). apache and php work fine, but in order to get .cgi scripts to run, I have to set the user's group on /run/httpd. As soon as I do (no restart of services required), .cgi scripts run fine.
Since /run is a tmpfs, the changes get reset on boot. The question I have is how is the /run/httpd directory created? If I disable the httpd service, the directory is still created, and always with apache as the group. What process creates that directory and where do I change the group name it uses to create it?
Something I might mention is that I have a Fedora 35 system that also has apache as the group for /run/httpd but it has no problem running .cgi or php.
One other thing: selinux is set to permissive while I get this stuff working.
Run httpd as user other than apache
Re: Run httpd as user other than apache
Created by tmpfiles.d via a config file in /usr/lib/tmpfiles.dThe question I have is how is the /run/httpd directory created?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Run httpd as user other than apache
Therefore, one can override the defaults with config file in /etc/tmpfiles.d
See https://www.freedesktop.org/software/sy ... les.d.html
Likewise, the settings of httpd.service can be augmented or replaced with files under /etc/systemd/system/
See https://www.freedesktop.org/software/sy ... les.d.html
Likewise, the settings of httpd.service can be augmented or replaced with files under /etc/systemd/system/
Re: Run httpd as user other than apache
But be aware that the httpd package is built assuming that it uses the correct user and all ownership of files that the package contains will be reset to httpd on package upgrade.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke