ispconfig update

Discussion in 'ISPConfig 3 Priority Support' started by Tom John, Jan 16, 2022.

  1. Tom John

    Tom John Active Member HowtoForge Supporter

    Hi guys,
    i am running ubuntu 20.04 and ispconfig 3
    i want to run an update of ispconfig with:
    sudo ispconfig_update.sh
    and i get these errors:
    Code:
    >> Update 
    
    Operating System: Ubuntu 20.04.3 LTS (Focal Fossa)
    
    This application will update ISPConfig 3 on your server.
    
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: 
    
    mkdir: cannot create directory ‘/var/backup/ispconfig_server5.cl-i.net_2022-01-16_15-16’: Permission denied
    chown: cannot access '/var/backup/ispconfig_server5.cl-i.net_2022-01-16_15-16': No such file or directory
    chmod: cannot access '/var/backup/ispconfig_server5.cl-i.net_2022-01-16_15-16': No such file or directory
    Creating backup of "/usr/local/ispconfig" directory...
    Backup failed. We stop here...
    
    
    
    the owner of backup is root so i imagine that i can not write the directory with another user however the user i am using has root privilage
    Code:
    tomdf@server5:~$ sudo ls -la /var/
    total 56
    drwxr-xr-x 14 root  root   4096 Oct 26  2020 .
    drwxr-xr-x 18 root  root   4096 Oct 25  2020 ..
    drwxr-xr-x  1 root  root   4096 Jun 23  2020 backup
    
    
    i changed to user root and get the same problems permission denied
    can you give me a hint how to solve that?
    thanks a lot for your kind help
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ISPConfig update must always be run as root user, you can't run it as another user. run:

    sudo -s

    when you are logged in as different user before you start to run the ISPConfig update.
     
  3. Tom John

    Tom John Active Member HowtoForge Supporter

    i did run that as root how you described, but i get the same error permission denied
    Code:
    
    mkdir: cannot create directory ‘/var/backup/ispconfig_server5.cl-i.net_2022-01-16_16-22’: Permission denied
    chown: cannot access '/var/backup/ispconfig_server5.cl-i.net_2022-01-16_16-22': No such file or directory
    chmod: cannot access '/var/backup/ispconfig_server5.cl-i.net_2022-01-16_16-22': No such file or directory
    Creating backup of "/usr/local/ispconfig" directory...
    Backup failed. We stop here...
    root@server5:/home/tomdf# 
    
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Plesae run the following commands as root user and post the result:

    df -h

    touch /var/backup/test.txt
     
    Th0m likes this.
  5. Tom John

    Tom John Active Member HowtoForge Supporter

    Code:
    root@server5:/home/tomdf# df -h
    Filesystem                                  Size  Used Avail Use% Mounted on
    udev                                        3.9G     0  3.9G   0% /dev
    tmpfs                                       797M  744K  796M   1% /run
    /dev/sda2                                   195G   11G  175G   6% /
    tmpfs                                       3.9G     0  3.9G   0% /dev/shm
    tmpfs                                       5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                                       3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/sda1                                   922M  142M  717M  17% /boot
    tmpfs                                       797M     0  797M   0% /run/user/0
    [email protected]:/  3.0T  1.4T  1.5T  48% /var/backup
    tmpfs                                       797M     0  797M   0% /run/user/1000
    root@server5:/home/tomdf# 
    
    Code:
    root@server5:/home/tomdf# touch /var/backup/test.txt
    touch: cannot touch '/var/backup/test.txt': Permission denied
    root@server5:/home/tomdf# 
    
    
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess either you mounted your backup storage from schaal-it.com read-only so that new files can't be written to it, or the backup storage is not working correctly. You might want to ask support from Schaal IT for instructions to mount their storage so that the updater can write to it.
     
    Th0m likes this.
  7. Tom John

    Tom John Active Member HowtoForge Supporter

    thanks a lot for your kind help.
    i setup the backup again and mount it again so now the script can make the backup.
    As well the backup of ispconfig is done but i get an error of chown. before running the script i made sudo -s and did run the script as root.
    here is the error do you have an idea why i get the error on chown?
    thanks again for your big help
    Code:
    >> Update 
    
    Operating System: Ubuntu 20.04.3 LTS (Focal Fossa)
    
    This application will update ISPConfig 3 on your server.
    
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: 
    
    chown: changing ownership of '/var/backup/ispconfig_server5.cl-i.net_2022-01-17_20-09': Permission denied
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    chown: changing ownership of '/var/backup/ispconfig_server5.cl-i.net_2022-01-17_20-09/etc.tar.gz': Permission denied
    chown: changing ownership of '/var/backup/ispconfig_server5.cl-i.net_2022-01-17_20-09/ispconfig_software.tar.gz': Permission denied
    PHP Warning:  chown(): Permission denied in /tmp/update_runner.sh.d9JHJTbo46/install/lib/update.lib.php on line 79
    PHP Warning:  chgrp(): Permission denied in /tmp/update_runner.sh.d9JHJTbo46/install/lib/update.lib.php on line 80
    Checking ISPConfig database .. OK
    Starting incremental database update.
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_0091.sql
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_0092.sql
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_0093.sql
    Executing PHP patch file: /tmp/update_runner.sh.d9JHJTbo46/install/patches/upd_0094.php
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_0094.sql
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_0095.sql
    Loading SQL patch file: /tmp/update_runner.sh.d9JHJTbo46/install/sql/incremental/upd_dev_collection.sql
    Reconfigure Permissions in master database? (yes,no) [no]: 
    
    Reconfigure Services? (yes,no,selected) [yes]: 
    
    Configuring Postfix
    Configuring Dovecot
    Configuring Mailman
    Configuring Spamassassin
    Configuring Amavisd
    Configuring Getmail
    Configuring BIND
    Configuring Pureftpd
    Configuring Apache
    Configuring vlogger
    Configuring Apps vhost
    Configuring Jailkit
    Configuring Ubuntu Firewall
    Configuring Database
    Updating ISPConfig
    ISPConfig Port [8080]: 
    
    Create new ISPConfig SSL certificate (yes,no) [no]: 
    
    Reconfigure Crontab? (yes,no) [yes]: 
    
    Updating Crontab
    Restarting services ...
    Update finished.
    root@server5:/home/tomdf# 
    
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's probably caused by your mounted backup storage, I don't expect that there is an issue with the update due to that. But it might be that your backup is accessible by more users than it should be accessible. So you should check the created backup file and ensure that it has secure permissions.
     
  9. Tom John

    Tom John Active Member HowtoForge Supporter

    thanks for your answer
    yes you are right, there are more users who have access to the backup space
    to i will change that that only 1 user has access then this not happens again
    thanks for your big help
     

Share This Page