The configured LOGFILE can not be modified.

  • This should be a simple one.

    Make sure the directory defined in /etc/z-push/z-push.conf.php is writeable by your webserver, and remove (or chown) the files in the directory to www-data:www-data.

    Here is my setting:

    root@exchange64:~# grep -n LOGFILE /etc/z-push/z-push.conf.php 
    110:    // The data will be saved into a dedicated file per user in the LOGFILEDIR
    121:    define('LOGFILEDIR', '/var/log/z-push/');
    122:    define('LOGFILE', LOGFILEDIR . 'z-push.log');
    123:    define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');


    root@exchange64:~# ls -al /var/log/z-push/
    total 213396
    drwx------  2 www-data www-data      4096 Oct  5 09:33 .                       <---- This is critical
    drwxr-xr-x 12 root     root          4096 Aug 30 06:25 ..
    -rwx------  1 www-data www-data      2131 Nov  6 10:53 autodiscover-error.log
    -rwx------  1 www-data www-data     17162 Nov  6 10:53 autodiscover.log
    -rwx------  1 www-data www-data  56271690 Oct  5 15:31 spam-54b5b86d397d4a7285ff1f6ee601b834.log
    -rwx------  1 www-data www-data   8397562 Nov 12 10:29 spam.log
    -rwx------  1 www-data www-data 112765363 Dec 28 11:59 spam-nine0c2f371d7682.log
    -rwx------  1 www-data www-data    245208 Dec 28 11:58 z-push-error.log
    -rwx------  1 www-data www-data       786 Aug 30 06:07 z-push-error.log.1.gz
    -rwx------  1 www-data www-data       649 Aug 28 14:31 z-push-error.log.2.gz
    -rwx------  1 www-data www-data       534 Aug 27 14:33 z-push-error.log.3.gz
    -rwx------  1 www-data www-data      1400 Aug 25 17:31 z-push-error.log.4.gz
    -rwx------  1 www-data www-data  40485152 Dec 28 12:02 z-push.log
    -rwx------  1 www-data www-data     50794 Aug 30 06:24 z-push.log.1.gz
    -rwx------  1 www-data www-data     61992 Aug 29 06:22 z-push.log.2.gz
    -rwx------  1 www-data www-data     55466 Aug 28 06:24 z-push.log.3.gz
    -rwx------  1 www-data www-data     24586 Aug 27 06:24 z-push.log.4.gz

  • @fbartels said in The configured LOGFILE can not be modified.:

    dpkg - l | grep z-push

    ii  z-push-autodiscover                        2.4.5+0-0                                  all          Z-Push autodiscover
    ii  z-push-backend-kopano                      2.4.5+0-0                                  all          Z-Push Kopano backend
    ii  z-push-common                              2.4.5+0-0                                  all          open source implementation of the ActiveSync protocol
    ii  z-push-config-apache                       2.4.5+0-0                                  all          Z-Push apache configuration
    ii  z-push-ipc-sharedmemory                    2.4.5+0-0                                  all          Z-Push ipc shared memory provider
    ii  z-push-kopano                              2.4.5+0-0                                  all          Z-Push for Kopano

  • Daniel,

    try to run this commands:

    chmod 755 /var/lib/z-push /var/log/z-push
    chown www-data:www-data /var/lib/z-push /var/log/z-push

    Now restart apache2 and see if it works.

  • @WalterHof i’ve already done this and it works, but i think fbartels wants to find out the reason why its not setting the rights automatically.

    Nevertheless, thanks for your help.

  • Daniel,

    this is an already known bug, I reported this bug many months ago - but it was not fixed up to today. I see this bug on every new installation and sometimes with upgrades.

  • Kopano

    I have to disagree on the “known bug”. I see no problems with our packaging when deploying a fresh test system. I was therefore more searching for the “bug” in user behaviour ;-)

  • I see this on most installations and sometimes with upgrades.

  • Forgotten,
    I fix this with the two lines mentioned above, so for me it is not longer an issue.

  • Kopano

    This is btw the place where the packaging sets these permissions (for Debian based platforms):,43-44

  • For me is the problem fixed, but nevertheless it was not functioning inbetween of the installation process.

  • @WalterHof said in The configured LOGFILE can not be modified.:

    chown www-data:www-data /var/lib/z-push /var/log/z-push

    same for me : new installation -> Debian 9

  • Kopano

    @mcdaniels Can you show which packages you have actually installed? (e.g. dpkg - l | grep z-push)

  • @fbartels
    z-push-backend-kopano 2.5.1+0-0
    z-push-common 2.5.1+0-0
    z-push-config-apache 2.5.1+0-0
    z-push-ipc-sharedmemory 2.5.1+0-0
    z-push-kopano 2.5.1+0-0

  • Kopano

    @mcdaniels in that case you should not have had the need to chown the directory, as this action is part of the postinst action of z-push-config-apache.

  • @fbartels: Strange, but the errormessage while installing via apt-get was the same as mentioned in this thread. Did the chown. It is working now.

  • @fbartels That is a nice, but wrong example.

    set_perms www-data www-data 700 /var/lib/z-push
    set_perms www-data www-data 700 /var/log/z-push

    should be

    set_perms www-data adm 750 /var/lib/z-push
    set_perms www-data adm 750 /var/log/z-push

    Confirm debian policy. ;-)

    install -d /var/lib/z-push -o www-data -g adm -m 750
    install -d /var/log/z-push -o www-data -g adm -m 750

    where user/group should be the variable to set to match the correct user/group per distro.

  • Kopano

    @thctlo your version may include more Debianisms (the adm group), but in the end achieves the same. The www-data user needs read/write permissions.

    So I would not say the current way is “wrong”.

  • yes, i do, because the "administrative group " adm, should have read access.
    which is/was in Red Hat : wheel
    but i can not confirm it that is still.

Log in to reply