1

I set up a logrotate configuration file containing containing two entries. the file contains the following:

/var/www/designer-24.com/var/log/* {
    daily
    missingok
    rotate 7
    dateext
    notifempty
    copytruncate
}

/var/www/designer-24.com/var/report/* {
    daily
    missingok
    rotate 7
    dateext
    notifempty
    copytruncate
}

Then I run the following command

sudo logrotate -s /var/log/logstatus logrotate.conf

The files get registered in the logstatus files. However, when I access the directory containing the files to be logrotated, I do not see any copies of the files except the original ones, and are not emptied.

Can anyone suggest why?

  • 3
    Welcome to Ask Ubuntu! Thanks for posting your solution, but please post it as an answer below instead of as a an edit to the question. The Stack Exchange sites are strictly questions & answers, so they don't work like forums. You might want to visit our help center or take the tour to understand how the sit works. – terdon Aug 10 '17 at 11:53
0

The OP added the following solution::

I added the following to each entry

su www-data www-data

Turns out it was a permissions issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.