HTTPD IP logger can’t write files

Support for security such as Firewalls and securing linux
Post Reply
_FabioTNT
Posts: 2
Joined: 2019/05/14 22:28:00

HTTPD IP logger can’t write files

Post by _FabioTNT » 2019/08/17 21:29:57

Hi, I have a problem:

An ip logger made in php with fopen,fwrite etc... does’t write file ips.log

The php file ad the log file are in the same directory.
The ips.log file has 777 permissions

Thanks.

aks
Posts: 2994
Joined: 2014/09/20 11:22:14

Re: HTTPD IP logger can’t write files

Post by aks » 2019/08/20 18:35:07

Where's it writing to? Have you considered selinux?

User avatar
TrevorH
Forum Moderator
Posts: 28585
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HTTPD IP logger can’t write files

Post by TrevorH » 2019/08/20 19:36:55

Selinux requires you to log to /var/log/httpd (or set up your own selinux rules to allow it elsewhere).
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Security Support”