>
> You simple place the log files in a different place where the user that
> creates the files has write perms or accomodate the "/var/log/
> your_application/*" directory permissions.
>
Yes I did this, and changed the rights to the user from the script:
mkdir /var/log/script
chown script.root /var/log/script
chmod 640 /var/log/script

But logrotate "complains":
=========================================
~# logrotate -d /etc/logrotate.d/script
reading config file /etc/logrotate.d/script
reading config info for /var/log/script/script.log

Handling 1 logs

rotating pattern: /var/log/script/escript.log
 10485760 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/script/script.log
error: "/var/log/script" has insecure permissions. It must be owned and be
writable by root only to avoid security problems. Set the "su" directive in
the config file to tell logrotate which user/group should be used for rotation.

error: stat of /var/log/script/script.log failed: No such file or directory
======================================================

My goal was NOT create the logfile on my own (as root).
so now, the only ("true") solution is to create the file  an change
the rights to user "script".

Logrotate is an great tool, but I thought it also can create the file
(instead of user who mostly has not sufficient rights), because
logrotate runs (ever) as root.
Would be a nice feature for an "comprehensive carefree package"of logrotate.

Thanks Meike


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAFNHiA9QP=vnqya2-+5ncqu5cspebq52gvg_pc+1ww0rxyz...@mail.gmail.com

Reply via email to