Author Topic: Logrotate domlogs  (Read 25105 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Re: Logrotate domlogs
« Reply #15 on: February 24, 2019, 08:45:47 PM »
tokar86a? I created the following conf file for my domlogs folder - hope it helps

"/usr/local/apache/domlogs/*" {
weekly
create 0644 root root
rotate 3
size 10M
dateext
missingok
notifempty
}

Should it not be create 0644 nobody root ??

According to the log that is already there.

Offline
*
Re: Logrotate domlogs
« Reply #16 on: February 24, 2019, 11:23:21 PM »
Could be for some, I have log files in that directory with root:root

Offline
*
Re: Logrotate domlogs
« Reply #17 on: February 25, 2019, 10:54:27 AM »
I end up whit this error

error: /etc/logrotate.d/domlog:1 lines must begin with a keyword or a filename (possibly in double quotes)

Offline
*
Re: Logrotate domlogs
« Reply #18 on: February 26, 2019, 07:34:22 AM »
Read all the previous posts?

Offline
*
Re: Logrotate domlogs
« Reply #19 on: February 26, 2019, 09:40:26 AM »
Yes and i have not uploaded the file from windows. I have create the config file whit help of: Create a new configuration file.

When i check /usr/local/apache/domlogs

It seems to have roatated the logs. But way give that error?
« Last Edit: February 26, 2019, 09:50:56 AM by tokar86a »

Offline
***
Re: Logrotate domlogs
« Reply #20 on: February 27, 2019, 03:04:15 AM »
Yes and i have not uploaded the file from windows. I have create the config file whit help of: Create a new configuration file.

When i check /usr/local/apache/domlogs

It seems to have roatated the logs. But way give that error?

Makes not sense you try to rotate "/usr/local/apache/domlogs/*".
Makes sense you try to rotate only "/usr/local/apache/domlogs/*.log" (or "/usr/local/apache/domlogs/*.bytes") files.
Otherwise you will rotate "*.gz" files already rotated.

Offline
*
Re: Logrotate domlogs
« Reply #21 on: February 27, 2019, 07:11:35 PM »
Still ends up whit

Operation failed!

error: /etc/logrotate.d/domlog:1 lines must begin with a keyword or a filename (possibly in double quotes)

Offline
***
Re: Logrotate domlogs
« Reply #22 on: March 03, 2019, 04:20:05 AM »
Surely you have mistyped some character of that file.
Or you are uploading that file to the server as "binary" mode through you Windows PC.

Offline
*
Re: Logrotate domlogs
« Reply #23 on: June 12, 2024, 06:26:14 PM »
I know this is an old thread, but posting this in case it helps others with the same issue.

I got the error when creating a config file from the CWP user panel "edit content" file link.  It was solved by pasting the directives into Notepad**, going to Edit>EOL Conversion>Unix (LF), saving the file, then uploading in the user panel file manger interface.

If you do this but still see the error you have a syntax issue.