Folks I'm having file-access problems in Apache 2.4 under Centos 7. In particular: - I have a file that's readable to every user and every application, (writeable by only one user), but my CGI scripts cannot read it. - Some of my CGI scripts need temporary storage for some files. They are, for example, some internal log files, tnat get cleaned up over time, but I want to be able to look at them (as root). Where would you suggest they be placed? I've tried /tmp/my_private_files/, and /var/tmp/my_private_files/, but Apache fails to find even the directory. Any suggestions? PS: Centos 6 had no such problems, and the file locations worked just fine. David
On Mon, 2017-11-20 at 18:19 -0800, david wrote:> Folks > > I'm having file-access problems in Apache 2.4 under Centos 7. In particular: > > - I have a file that's readable to every user and every application, > (writeable by only one user), but my CGI scripts cannot read it. > > - Some of my CGI scripts need temporary storage for some files. They > are, for example, some internal log files, tnat get cleaned up over > time, but I want to be able to look at them (as root). Where would > you suggest they be placed? I've tried /tmp/my_private_files/, and > /var/tmp/my_private_files/, but Apache fails to find even the directory. > > Any suggestions?What is the status of selinux on your system? If it is on try switching to permissive mode. Any error messages in /var/log/messages or your apache logs or audit logs? Finally, have a look through the list archives as I seem to remember some discussion of this recently - specifically threads like: https://lists.centos.org/pipermail/centos/2017-September/166000.html P.
Hi David, On Tue, Nov 21, 2017 at 3:19 AM, david <david at daku.org> wrote:> I'm having file-access problems in Apache 2.4 under Centos 7. In > particular: > > - I have a file that's readable to every user and every application, > (writeable by only one user), but my CGI scripts cannot read it. > > - Some of my CGI scripts need temporary storage for some files. They are, > for example, some internal log files, tnat get cleaned up over time, but I > want to be able to look at them (as root). Where would you suggest they be > placed? I've tried /tmp/my_private_files/, and /var/tmp/my_private_files/, > but Apache fails to find even the directory. >in the /usr/lib/systemd/system/httpd.service file change PrivateTmp=true to PrivateTmp=false and then "systemctl daemon-reload" and "systemctl restart httpd" Regards Alex
On 23.11.2017 13:02, Alexander Farber wrote:> in the /usr/lib/systemd/system/httpd.service file change PrivateTmp=true to > PrivateTmp=false > and then "systemctl daemon-reload" and "systemctl restart httpd"Please don't modifications in /usr/lib/systemd/system/. System updates will overwrite your changes. official way is to copy the unit file to /etc/systemd/system and edit this copy. best regards Ulf