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: 3073
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
Site Admin
Posts: 33202
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).
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

Post Reply