Internal Server Error on ISPCONFIG

Discussion in 'General' started by Deolu, May 1, 2021.

Tags:
  1. Deolu

    Deolu New Member

    Hello, I am having an internal server error on my websites running on ISPConfig 3.
    While working on the permission of my web folder I did
    chown -R www-data:www-data /var/www/
    Afterwards, got operation not permitted on my websites folders as follows:
    chown: changing ownership of '/var/www/php-fcgi-scripts/web16/.php-fcgi-starter': Operation not permitted
    chown: changing ownership of '/var/www/php-fcgi-scripts/web22/.php-fcgi-starter': Operation not permitted
    chown: changing ownership of '/var/www/php-fcgi-scripts/web7/.php-fcgi-starter': Operation not permitted
    So far I have tried changing the permission back to root as follows:
    root@vps-c4b3a0d6:/var/www/clients/client13/web26# chown root web
    root@vps-c4b3a0d6:/var/www/clients/client13/web26# ls
    cgi-bin log private ssl tmp web webdav
    root@vps-c4b3a0d6:/var/www/clients/client13/web26# ls -ld web
    drwxr-xr-x 8 root www-data 4096 May 1 10:28 web
    The server stopped responding when i edited the wp-config.php file in my wordpress installation on the server,
    root@vps-c4b3a0d6:/var/www/clients/client13/web26# chgrp root web
    I removed : define( 'UPLOADS', 'wp-content/uploads' );
     
  2. Deolu

    Deolu New Member

     
  3. Deolu

    Deolu New Member

    root@vps-c4b3a0d6:/home/ubuntu# wget -q -O htf-common-issues.php "http://gitplac e.net/pixcept/ispconfig-tools/raw/stable/htf-common-issues.php" && php -q htf-co mmon-issues.php

    ##### SCRIPT FINISHED #####
    Results can be found in htf_report.txt
    To view results use your favourite text editor or type 'cat htf_report.txt | mor e' on the server console.

    If you want to see the non-anonymized output start the script with --debug as pa rameter (php -q htf-common-issues.php --debug).

    root@vps-c4b3a0d6:/home/ubuntu# php -q htf-common-issues.php --debug

    ##### SERVER #####
    IP-address (as per hostname): 127.0.1.1
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.1 LTS

    [INFO] uptime: 15:22:58 up 69 days, 8:44, 1 user, load average: 0.02, 0.07, 0.02

    [INFO] memory:
    total used free shared buff/cache available
    Mem: 3.8Gi 1.0Gi 1.3Gi 8.0Mi 1.5Gi 2.5Gi
    Swap: 0B 0B 0B

    [INFO] systemd failed services status:
    UNIT LOAD ACTIVE SUB DESCRIPTION
    ● certbot.service loaded failed failed Certbot
    ● clamav-daemon.service loaded failed failed Clam AntiVirus userspace daemon
    ● snap.lxd.activate.service loaded failed failed Service for snap application lx d.activate

    LOAD = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB = The low-level unit activation state, values depend on unit type.

    3 loaded units listed.

    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.2dev20201016


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 7.4.3

    ##### PORT CHECK #####


    ##### MAIL SERVER CHECK #####

    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connecti ons you have to enable this.

    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Apache 2 (PID 3258741)
    [INFO] I found the following mail server(s):
    Postfix (PID 1799)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 599)
    [INFO] I found the following imap server(s):
    Dovecot (PID 599)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 1521653)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    127.0.0.1:10023 (904/postgrey)
    127.0.0.1:10024 (1393/amavisd-new)
    127.0.0.1:10025 (1799/master)
    127.0.0.1:10026 (1393/amavisd-new)
    127.0.0.1:10027 (1799/master)
    127.0.0.1:11211 (615/memcached)
    0.0.0.0:110 (599/dovecot)
    0.0.0.0:143 (599/dovecot)
    0.0.0.0:465 (1799/master)
    51.68.198.169:53 (3009123/named)
    127.0.0.1:53 (3009123/named)
    0.0.0.0:21 (1521653/pure-ftpd)
    127.0.0.53:53 (512/systemd-resolve)
    0.0.0.0:22 (4027970/sshd:)
    127.0.0.1:953 (3009123/named)
    0.0.0.0:25 (1799/master)
    0.0.0.0:993 (599/dovecot)
    0.0.0.0:995 (599/dovecot)
    ::1:10024 (1393/amavisd-new)
    :::3306 (2636483/mysqld)
    ::1:10026 (1393/amavisd-new)
    :::110 (599/dovecot)
    :::143 (599/dovecot)
    :::8080 (3258741/apache2)
    :::80 (3258741/apache2)
    :::8081 (3258741/apache2)
    :::465 (1799/master)
    fe80::f816:3eff:fef3:53 (3009123/named)
    ::1:53 (3009123/named)
    :::21 (1521653/pure-ftpd)
    :::22 (4027970/sshd:)
    :::25 (1799/master)
    ::1:953 (3009123/named)
    :::443 (3258741/apache2)
    :::993 (599/dovecot)
    :::995 (599/dovecot)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You messed up the whole permissions of the /var/www folder, folders in there are owned by many different users (each website has its own user) and groups and you changed all of them to www-data. Do you have a backup that you can restore or a snapshot of the VM to revert to?
     
  5. Deolu

    Deolu New Member

    Thanks for the reply, was having permission issues was trying to edit permission for just the user I was working on.
    I don't have a back up to revert to, however, I updated the Ispconfig installation, so I got access back to ispconfig.
    The websites are still unreachable.
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    At this point, the best thing to do is set up a new server and migrate the website data to that server. The migration tool can be used for such migrations.

    EDIT: Just to clarify. Setting the correct permissions for every subfolder of /var/www, where some subfolders of subfolders might need different permissions as well, is basically impossible. You might get a working system, but you will have problems later on.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    www-data is never the right user and group for an ISPConfig website when you have permission issues. If you have issues that a cms can't write to it's web folder, then double check that you use the right PHP mode (php-fpm) and that the suexec checkbox is enabled in the website settings on Apache servers. And of course, take care to upload files with the right user to the website or if you uploaded as root, just chown the files inside the web folder to the web[id] user of that website and the client[id] group of that site.
     

Share This Page