title: Problems with permissions for logrotate
body: <p>I'm writing my own logrotate configuration for some web application:</p>
  
  <pre><code>/home/me/public_html/logs/*.log {
      daily
      missingok
      rotate 15
      compress
      delaycompress
      notifempty
      create 0660 me www-data
      nosharedscripts
  }
  </code></pre>
  
  <p>But running logrotate for these files results in:</p>
  
  <pre><code>$ sudo logrotate -d -v *.log
  Ignoring logfile1.log because of bad file mode.
  Ignoring logfile2.log because of bad file mode.
  Ignoring otherlogfile.log because of bad file mode.
  
  Handling 0 logs
  $ ls -l
  -rw-rw---- 1 me www-data  893584 Jan 27 16:01 logfile1.log
  -rw-rw---- 1 me www-data  395011 Jan 27 16:01 logfile2.log
  -rw-rw---- 1 me www-data 4949115 Jan 27 16:01 otherlogfile.log
  </code></pre>
  
  <p>Is this related to the file permissions of the actual logfiles in the directory of to the permissions specified with <code>create 0660 me www-data</code>?</p>
  
  <p>If I change the filepermissions to <code>-rw-r-----</code> and the <code>create</code> line to</p>
  
  <pre><code>create 0640 me www-data
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>$ sudo logrotate -d -v *.log
  Ignoring logfile1.log because the file owner is wrong (should be root).
  Ignoring logfile2.log because the file owner is wrong (should be root).
  Ignoring otherlogfile.log because the file owner is wrong (should be root).
  
  Handling 0 logs
  </code></pre>
  
  <p>My system is a debian testing/jessie.</p>