logrotate permission question

Smoot Carl-Mitchell smoot at tic.com
Wed Apr 15 19:55:51 UTC 2009


On Wed, 2009-04-15 at 20:27 +0100, Oliver Marshall wrote:
> Hi chaps
> 
>  
> 
> I’ve created a logrotate config to roll the php error.log file
> (/var/log/php/error.log) each week. This works fine but the new
> error.log file that’s left (created) after the log is rolled only has
> permissions for root to read/write, but it appears that it also needs
> to have www-data read/write for the apache process to write to it.

Add

create 640 www-data www-data

to your config file.  See logrotate(8) for details.
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list