Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using logrotate from a cronjob, I am getting this erros:

error: unable to open /var/log/mylog.1  for compression

Does any one know what does it mean and how can I fix it ?

share|improve this question

migrated from Nov 10 '11 at 10:38

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

It means that /var/log/mylog.1 does not exist or the permissions/ownership do not allow that file to be compressed. Check the permissions/ownership with ls -l /var/log/mylog*.

share|improve this answer

You're going to need to get more information.

Does the file exist, and does the user running cron have permission to read it?:

ls -l /var/log/mylog.1

See if logrotate can give more information. It should have a verbose flag you can turn on with '-v'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.