Files with www-data permission

Discussion in 'Installation/Configuration' started by Daninor, Feb 14, 2021.

  1. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No.

    Are you still experiencing the original issue (www-data vs webuser permissions), or is this solved but is now PHP your problem?
     
  2. Daninor

    Daninor Member

    I still have the original issue. But I wrote about the PHP because I thougt that may be relevant.

    If this could help, here is what changed during the upgrade. After this completed I did a restart of the server.
    (Too big to add as code)
    https://textbin.net/embed/untitled-45
     
    Last edited: Feb 15, 2021
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    This indicates that your PHP or suexec setup is broken indeed as this is neither necessary on a normal system nor should you do this as it opens a security hole.
     
  4. Daninor

    Daninor Member

    Thanks for confirming. How would you go to repair this?
     
  5. Daninor

    Daninor Member

    I did this and its working after some time? Could really this be the issue..
    Code:
    a2enmod suexec rewrite ssl actions include cgi
    Module suexec already enabled
    Module rewrite already enabled
    Considering dependency setenvif for ssl:
    Module setenvif already enabled
    Considering dependency mime for ssl:
    Module mime already enabled
    Considering dependency socache_shmcb for ssl:
    Module socache_shmcb already enabled
    Module ssl already enabled
    Module actions already enabled
    Considering dependency mime for include:
    Module mime already enabled
    Module include already enabled
    Your MPM seems to be threaded. Selecting cgid instead of cgi.
    Enabling module cgid.
    To activate the new configuration, you need to run:
      systemctl restart apache2
    
    I tried to do ispconfig_update.sh --force and reinstall. But I still need to do this to get access to ISPconfig panel. (all sites is working)
    chmod 660 /usr/local/ispconfig/interface/lib/config.inc.php
    chmod 660 /usr/local/ispconfig/interface/lib/classes/IDS/../../../temp

    From error logs:
    Code:
    AH01071: Got error 'PHP message: PHP Warning:  require_once(/usr/local/ispconfig/interface/lib/config.inc.php): failed to open stream: Permission denied in /usr/local/ispconfig/interface/web/index.php on line 31\nPHP message: PHP Fatal error:  require_once(): Failed opening required '../lib/config.inc.php' (include_path='.:/usr/share/php') in /usr/local/ispconfig/interface/web/index.php on line 31\n', referer: https://mysite.com
    If I do this command a2dismod proxy_fcgi my panel starts working, but all other sites stop working for the PHP. Seems like some conflicts?
     
    Last edited: Feb 15, 2021
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The proxy_fcgi might be required, depending on the apache version. so do not deactivate it. You should go through the webserver install chapter of the matching perfect server tutorial and rerun all commands that you find in that chapter to ensure that you have the required software installed and the right modules enabled.
     
  7. Daninor

    Daninor Member

    Done this twice to be 100% sure, but getting the same error. Just the ispconfig panel not working..
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Hm, let's see more info on the PHP version used by the panel:
    Open a new file:
    Code:
    nano /usr/local/ispconfig/interface/web/phpinfo.php
    Then paste this in that file:
    Code:
    <?php
    phpinfo();
    ?>
    Then go to your panel /phpinfo.php:
    https://server1.example.com:8080/phpinfo.php
    What do you see there?
     
  9. Daninor

    Daninor Member

    I see this PHP version:
    Code:
    PHP Version 7.2.34-13+ubuntu18.04.1+deb.sury.org+1
     
  10. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  11. Daninor

    Daninor Member

    till likes this.
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  13. Daninor

    Daninor Member

  14. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You should install PHP 7.4 and configure it as default with
    Code:
    update-alternatives --config php
    and
    Code:
    update-alternatives --config php-cgi
     
    Daninor likes this.
  15. Daninor

    Daninor Member

    This helped. I forgot the second part "update-alternatives --config php-cgi"

    By the way, after testing a littlebit, phpmyadmin and roundcube does not work after the fix you suggested. I get this error in the apache logs:
    Code:
    [[15~[Fri Feb 19 17:36:39.245911 2021] [proxy:error] [pid 166648:tid 139740496156416] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/[email protected][email protected] (*) failed
    [Fri Feb 19 17:36:39.245943 2021] [proxy_fcgi:error] [pid 166648:tid 139740496156416] [client xxxxxxx:61640] AH01079: failed to make connection to backend: httpd-UDS
     
  16. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    My bad, I forgot adding "(Replace @[email protected] with the correct version for the config file)" to the steps. Please replace this in your config files.
     
  17. Daninor

    Daninor Member

    Works now. I should have seen that myself, but its idiotproof now:D
     
  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I completely read over it as I wanted the post to be done ASAP :) When the PHP version build is done it is replaced, but ofcourse not when you edit it yourself.

    I expect the build of the new packages to be done soon so most users won't have to manually modify the files.
     

Share This Page