Roundcube On debian 10 error 403

Discussion in 'Server Operation' started by ewkilian, Oct 29, 2020.

  1. ewkilian

    ewkilian Member

    Hi,
    After UPgrade the OS et package, I have now a error 403 when I go to the Roundcube URL.
    I use Debian 10 with ISPCONFIG.
    I don't find the origin.
    Nothing on the Apache log :
    Code:
    [29/Oct/2020:08:43:03 +0100] "GET /webmail/ HTTP/1.1" 403   437 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/8  6.0.4240.111 Safari/537.36"
    
    And I have execute :
    Code:
     apt-get install roundcube roundcube-core roundcube-mysql roundcube-plugins
    I have look the configuration, I find nothing.
    Have you a idea to help me ?
    Its possible to ReInstall all the roundcube package ? If yes, how ?
    Thank you very a lot
     
  2. ewkilian

    ewkilian Member

    also i updated the MariaDB server. Does it come from that?
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Post ISPConfig questions on ISPConfig forum.
    Start with this: https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
    What kind of update did you do? Did you have Debian 9 and upgraded that to Debian 10?
    So you are running ISPConfig? What version? Did you upgrade ISPConfig?
    If you on an ISPConfig system install a different version of Roundcube it may not work. And changing the installed MariaDB version is sure to break the system, from what I remember from previous discussions.
    After changing application version back to what ISPConfig Perfect Server Guide installs, force ISPConfig to do reconfigure services, that may get your system back to working condition.
     
  4. ewkilian

    ewkilian Member

    No sorry, I use the wrong term, I have Update Debian 10 (no Upgrade, sorry)
    You can see here : https://termbin.com/9sfb the result from the ISPCONFIG TEST.
    Yes I have Upgrade ISPCONFIG.
    Then I must search the command to reconfigure all service. that's it ?
    Thank you lot
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Force reconfigure services is done by running update.php from the ISPConfig installation package and choosing reconfigure services when the updater asks about that. Commands to run below, but check that in wget you download the same version of ISPConfig you now have installed (or later version if you want to upgrade to that, but do not use older ISPConfig).
    Code:
    cd /tmp
    wget https://www.ispconfig.org/downloads/ISPConfig-3.2.tar.gz
    tar xvfz ISPConfig-3.2.tar.gz
    cd ispconfig3_install/install
    php -q update.php
     
  6. ewkilian

    ewkilian Member

    Hi thank you for the command, I have do that :
    Code:
    ....
    
    Reconfigure Services? (yes,no,selected) [yes]: yes
    
    Configuring Postfix
    sh: postalias: command not found
    sh: postmap: command not found
    Configuring Spamassassin
    Configuring Getmail
    Configuring Apache
    Configuring vlogger
    Skipping config of Apps vhost
    Configuring Jailkit
    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.
    
    But I have alway the same erreor :
    https://xx.xx.xx.xx:8080/webmail
    "
    Forbidden
    You don't have permission to access this resource.
    "
    I don't Understand :( Can I uninstall Roudcune et Reinstall ?
    Thank you
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Your installation is weird. Maybe it is screwed up beyond repair.
    Can you just start over from the beginning, install the OS on an empty disk and then install ISPConfig? This time do it following the installation instructions carefully and not do anything that you are not told to do in the instructions.
    Or is this a productions server that has been running for a while already?
     
  8. ewkilian

    ewkilian Member

    Thx for your return, but Sorry this server is on production for 2 years, and the Exchange with Postfix is OK (IMAP and SMTP OK)
     
  9. ewkilian

    ewkilian Member

    Hi,Now I have more information :
    Code:
    [Fri Oct 30 09:39:29.926634 2020] [authz_core:error] [pid 28047] [client xx.xxx.xx.xx:59309] AH01630: client denied by server configuration: /var/lib/roundcube/
    Code:
    root@SRV:/tmp/ispconfig3_install/install# ls -al /var/lib/roundcube/
    total 20
    drwxr-xr-x  5 root     root     4096 Oct 27 11:19 .
    drwxr-xr-x 54 root     root     4096 Oct 27 11:19 ..
    lrwxrwxrwx  1 root     root       14 Aug 11 17:44 config -> /etc/roundcube
    lrwxrwxrwx  1 root     root       23 Aug 11 17:44 .htaccess -> /etc/roundcube/htaccess
    lrwxrwxrwx  1 root     root       30 Aug 11 17:44 index.php -> /usr/share/roundcube/index.php
    lrwxrwxrwx  1 root     root       19 Aug 11 17:44 logs -> ../../log/roundcube
    drwxr-xr-x  2 root     root     4096 Oct 29 08:29 plugins
    lrwxrwxrwx  1 root     root       28 Aug 11 17:44 program -> /usr/share/roundcube/program
    drwxr-xr-x  2 root     root     4096 Oct 27 11:19 skins
    drwxr-x---  2 www-data www-data 4096 Aug 11 17:44 temp
    root@SRV:/tmp/ispconfig3_install/install#
    Code:
    /etc/apache2/conf-available# cat roundcube.conf
    
    
    # Those aliases do not work properly with several hosts on your apache server
    # Uncomment them to use it or adapt them to your configuration
    #    Alias /roundcube /var/lib/roundcube
    Alias /roundcube /var/lib/roundcube
    Alias /webmail /var/lib/roundcube
    
    
    
    <Directory /var/lib/roundcube/>
      Options +FollowSymLinks
      # This is needed to parse /var/lib/roundcube/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      <IfVersion >= 2.3>
        Require all granted
      </IfVersion>
      <IfVersion < 2.3>
        Order allow,deny
        Allow from all
      </IfVersion>
    </Directory>
    
    # Protecting basic directories:
    <Directory /var/lib/roundcube/config>
            Options -FollowSymLinks
            AllowOverride None
    </Directory>
    
    <Directory /var/lib/roundcube/temp>
            Options -FollowSymLinks
            AllowOverride None
            <IfVersion >= 2.3>
              Require all denied
            </IfVersion>
            <IfVersion < 2.3>
              Order allow,deny
              Deny from all
            </IfVersion>
    </Directory>
    
    <Directory /var/lib/roundcube/logs>
            Options -FollowSymLinks
            AllowOverride None
            <IfVersion >= 2.3>
              Require all denied
            </IfVersion>
            <IfVersion < 2.3>
              Order allow,deny
              Deny from all
            </IfVersion>
    </Directory>
    I see on this direction
     
    Last edited: Oct 30, 2020
  10. ewkilian

    ewkilian Member

  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Better undo what that tuto told you to do.

    To maybe get your setup to a state that works:
    • follow the ISPConfig perfect server guide for Debian 10. Run the install commands and edit the configuration files. PHPMyadmin can be installed from Debian Buster backports, in my opinion that is better way than the method the guide suggests. Your system is for example missing postcat and postalias and who knows what else. Check you have installed the versions of programs the guide says, now you have PHP 7.4 which does not work with ISPConfig on Debian 10 for example.
    • force reconfigure services again
    It may be better to discard the system you now have, but if you have time to potter with it you may get it back to working order eventually. Can you restore the system to the state it was before you installed new versions of roundcube, mariadb and PHP?
    If that is not possible, what almost surely would get you a working system is to install a second host with Debian 10 and ISPConfig, following the Perfect Server Guide, then use ISPConfig migration toolkit to migrate all your data from the old system to the new.
    Admins: could you move this thread to ISPConfig forum, Linux server operation is a wrong place.
     
  12. ewkilian

    ewkilian Member

    I must find a solution for this server... Can't move to another :(.
    For information : the error :
    sh: postalias: command not found
    sh: postmap: command not found
    resultat that I don't have install MailMan.

    Can I force the php version for ISPConfig ? its possible with website, but with ISP I don't know.
    And for Rouncube ? (PHP 7.3)
    I must keep php 7.4 for a website
     
  13. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    your missing a line from the tutorial in the
    Code:
    <Directory /var/lib/roundcube/>
    section of /etc/apache2/conf-available/roundcube.conf

    the missing line is:
    Code:
    AddType application/x-httpd-php .php
     
  14. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    another thing to check, ensure /usr/share/roundcube and all it's contents are owned by root:root
     
  15. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    How did you run the updater? You must set use "su -" or "sudo -i" or similar to ensure your environment (particularly PATH) is set correctly or the install/update will fail. I'd expect more errors than just those two, though.
     
    Th0m likes this.
  16. ewkilian

    ewkilian Member

    Hi all
    In the First thank all you for your help
    nhybgtvfr :
    I have add
    Code:
    AddType application/x-httpd-php .php
    But nothing change.
    You cas see right here :
    Code:
    root@SRV:/etc/apache2/conf-available# ls -al  /usr/share/roundcube
    total 60
    drwxr-xr-x   8 root root  4096 Oct 27 11:19 .
    drwxr-xr-x 203 root root  4096 Oct 27 11:19 ..
    drwxr-xr-x   2 root root  4096 Oct 27 11:19 bin
    -rw-r--r--   1 root root   996 Aug 11 17:44 composer.json
    -rw-r--r--   1 root root  3848 Aug 11 17:44 config.inc.php.sample
    -rw-r--r--   1 root root  3146 Aug 11 17:44 .htaccess
    -rw-r--r--   1 root root 12838 Aug 10 20:58 index.php
    drwxr-xr-x   3 root root  4096 Oct 27 11:19 installer
    drwxr-xr-x  34 root root  4096 Oct 29 08:29 plugins
    drwxr-xr-x   8 root root  4096 Oct 27 11:19 program
    drwxr-xr-x   4 root root  4096 Oct 27 11:19 skins
    drwxr-xr-x   7 root root  4096 Oct 27 11:19 SQL


    Jesse Norell, I use SU to connect with Root and then I execute : php -q update.php

    I have no idea :(
    thank you for all
     
  17. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    as jesse states, you can't just use 'su' on debian, you must use 'su -' (or su -s i think i remember seeing stated in these forums???)
    i use ubuntu rather than debian, so that isn't required for me, no idea why debian would make it possible to su without the correct environment setttings....
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I have always used
    Code:
    su -
    since that dash character causes the session start like a login session, so root PATH etc are set up correctly. I did not know that plain su used to work.
     
  19. ewkilian

    ewkilian Member

    Hi,
    I have 2 PHP version on the same server. 7.3 and 7.4
    Can I force to run Roundcube with PHP7.3 ? can this be the cause?
    thanks
     
  20. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    if you have it on it's own url, eg webmail.mydomain.tld, you can set whatever php handler and version you want for that vhost.
    if you using the alias /webmail or /roundcube at the end of any hosted website url eg client1domain.com/roundcube i believe it uses whatever php handler and version that particular site is set to use.
    that said, assuming all the required php modules are installed, webmail should run perfectly fine on both php7.3 and php7.4
    since you have two versions of php installed, it might be worth double checking which version is set to be the systems default, which i believe should be 7.3, if the system default php gets changed that can definitely cause problems.
     
    Taleman likes this.

Share This Page