1.2.0 and logrotate

  • Hi,


    since a week i have deployed the imscp update 1.2.0 and recieve the error every day:


    Code
    1. /etc/cron.daily/logrotate:
    2. error: skipping "/var/log/apache2/imscp.testi.de/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
    3. error: skipping "/var/log/apache2/imscp.testi.de/error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.


    What can i do?

  • Re ;


    I can reproduce the problem under Wheezy:


    Shell-Script
    1. root@wheezy:/# logrotate -fv /etc/logrotate.d/apache2reading config file /etc/logrotate.d/apache2Handling 2 logsrotating pattern: /var/log/apache2/*.log forced from command line (7 rotations)empty log files are not rotated, old logs are removedconsidering log /var/log/apache2/access.log log does not need rotatingconsidering log /var/log/apache2/error.log log needs rotatingrotating log /var/log/apache2/error.log, log->rotateCount is 7dateext suffix '-20150114'glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'compressing log with: /bin/gziprenaming /var/log/apache2/error.log.7.gz to /var/log/apache2/error.log.8.gz (rotatecount 7, logstart 1, i 7), renaming /var/log/apache2/error.log.6.gz to /var/log/apache2/error.log.7.gz (rotatecount 7, logstart 1, i 6), renaming /var/log/apache2/error.log.5.gz to /var/log/apache2/error.log.6.gz (rotatecount 7, logstart 1, i 5), renaming /var/log/apache2/error.log.4.gz to /var/log/apache2/error.log.5.gz (rotatecount 7, logstart 1, i 4), renaming /var/log/apache2/error.log.3.gz to /var/log/apache2/error.log.4.gz (rotatecount 7, logstart 1, i 3), renaming /var/log/apache2/error.log.2.gz to /var/log/apache2/error.log.3.gz (rotatecount 7, logstart 1, i 2), renaming /var/log/apache2/error.log.1.gz to /var/log/apache2/error.log.2.gz (rotatecount 7, logstart 1, i 1), renaming /var/log/apache2/error.log.0.gz to /var/log/apache2/error.log.1.gz (rotatecount 7, logstart 1, i 0), old log /var/log/apache2/error.log.0.gz does not existrenaming /var/log/apache2/error.log to /var/log/apache2/error.log.1creating new /var/log/apache2/error.log mode = 0640 uid = 0 gid = 4running postrotate scriptremoving old log /var/log/apache2/error.log.8.gzrotating pattern: /var/log/apache2/*/*.log forced from command line (365 rotations)empty log files are not rotated, old logs are removedconsidering log /var/log/apache2/default/access.log log does not need rotatingconsidering log /var/log/apache2/domain1.tld/access.log log does not need rotatingconsidering log /var/log/apache2/domain1.tld/error.log log does not need rotatingconsidering log /var/log/apache2/wheezy.nuxwin.com/access.logerror: skipping "/var/log/apache2/wheezy.nuxwin.com/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.considering log /var/log/apache2/wheezy.nuxwin.com/error.logerror: skipping "/var/log/apache2/wheezy.nuxwin.com/error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.not running postrotate script, since no logs were rotated



    As far as I can see, The issue is due to the Apache log directory of the panel vhost which has wrong permissions. Will be fixed in next release. This is really strange because normally, the panel vhost in 1.2.x version is managed by nginx... I'll investigate and fix.


    Thanks for your report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Sierra


    Do you're using the PanelRedirect plugin? I've just found a bug it it.


    @Ninos mode value in the make() method of the iMSCP::Dir module must not be passed as string ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Re;


    Fixed. See https://github.com/i-MSCP/plug…4ef46104120bd84162b70c00d


    Will be released by @Ninos soon ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206