1

I'm trying to manage logs which are generated by local scripts. These logs are nothing but stdout and stderr redirected to local files. I don't have root access and trying to run logrotate as a localuser with a local config file gives me the error:

Ignoring /home/user/customlogfile because the file owner is wrong (should be root).
Handling 0 logs

Is it possible to run logrotate as a local user?

1 Answer 1

1

I'm trying to manage logs which are generated by local scripts. These logs are nothing but stdout and stderr redirected to local files.

Then you don't need logrotate in the first place.

Get yourself one or more of:

and send script standard output and standard error through a pipe to their standard input, in the normal way.

They will write a set of automatically cycled, rotateable-on-demand, strictly size-capped logs in a directory that you specify, with no need for any additional log rotation programs at all. None of them need any superuser privileges. (In fact, far from needing or expecting superuser privileges it is best practice in their most widely known use case, logging daemon output, to run them under unprivileged accounts.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .