Project

General

Profile

Actions

Bug #5547

closed

sarg log rotate is broken

Added by Nicolas Marot about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/27/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
All

Description

when rotate dansguardian logs (but should applied for other proxy, since it is a function), sarg does a mistake on filename
access.log becomes access.log.0 and becomes access.log1 and then rotation is broken

this is in /usr/local/pkg/sarg.inc :

line 91 //rename("{$log_file}.{$i}", "{$log_file}" . ($i + 1));
line 92 rename("{$log_file}.{$i}", "{$log_file}." . ($i + 1));

there is also something wrong with 10th file, which is not deleted as expected :

line 85 // remove .10 rotate log file
line 86 unlink_if_exists("{$log_file}.10");

Finally, when access.log is rotated, file access right is changed from 644 to 666
I don't know where to fix this

Actions

Also available in: Atom PDF