Discussion:
File system permissions for log files on Debian Apache 2.4
(too old to reply)
Isaac Puch Rojo
2016-11-10 10:23:54 UTC
Permalink
It is a way to tell apache with file permision sould have the logs?

I have the php-log here: /var/log/php/phperror.log If this file don't exist, apache will be create one with root.root and 644 permisions. The PHP-scripts can't write to this file. I need www-data.www-data and 640.

What is the best practices mode to do it?

Regards,
Isaac Puch
I R A Darth Aggie
2016-11-22 17:28:19 UTC
Permalink
On Thu, 10 Nov 2016 02:23:54 -0800 (PST),
Post by Isaac Puch Rojo
It is a way to tell apache with file permision sould have the logs?
I have the php-log here: /var/log/php/phperror.log If this file
don't exist, apache will be create one with root.root and 644
permisions. The PHP-scripts can't write to this file. I need
www-data.www-data and 640.
What is the best practices mode to do it?
I would create an entry in /etc/lograte.d for php-log, probably just
copy the apache2 file as a basis, and then change

create 640 root adm
to
create 640 www-data www-data

then manually create your error log with the appropriate
permissions. Tho you may not need/want the pre and post rotate
sections. Then you'll get rotating logs, and accesible permissions for
php-log.
--
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.
k***@gmail.com
2018-05-05 16:05:06 UTC
Permalink
Post by Isaac Puch Rojo
It is a way to tell apache with file permision sould have the logs?
I have the php-log here: /var/log/php/phperror.log If this file don't exist, apache will be create one with root.root and 644 permisions. The PHP-scripts can't write to this file. I need www-data.www-data and 640.
What is the best practices mode to do it?
Regards,
Isaac Puch
It is a way to tell apache with file permision sould have the logs?
I have the php-log here: /var/log/php/phperror.log If this file don't exist, apache will be create one with root.root and 644 permisions. The PHP-scripts can't write to this file. I need www-data.www-data and 640.
What is the best practices mode to do it?
Regards,
Isaac Puch
It is a way to tell apache with file permision sould have the logs?
I have the php-log here: /var/log/php/phperror.log If this file don't exist, apache will be create one with root.root and 644 permisions. The PHP-scripts can't write to this file. I need www-data.www-data and 640.
What is the best practices mode to do it?
Regards,
Isaac Puch
f***@gmail.com
2018-06-18 03:04:41 UTC
Permalink
Post by Isaac Puch Rojo
It is a way to tell apache with file permision sould have the logs?
I have the php-log here: /var/log/php/phperror.log If this file don't exist, apache will be create one with root.root and 644 permisions. The PHP-scripts can't write to this file. I need www-data.www-data and 640.
What is the best practices mode to do it?
Regards,
Isaac Puch
Loading...