Prestashop APS cannot install - ISPConfig security level

Discussion in 'ISPConfig 3 Priority Support' started by arkehost, Jan 4, 2019.

Tags:
  1. arkehost

    arkehost New Member HowtoForge Supporter

    Hi,
    I'm trying to install a Prestashop site, but installation always fail on first step due to permissions.
    APS Prestashop 1.7.4 or downloaded Prestashop 1.7.5 is the same.
    webserver security level set to "high"
    php-fpm / fcgi with suexec
    Installing for example wordpress, gives no problems.
    Downgrading security level to medium solve the problem
    I'd rather wish to leave security level to high.
    Can someone point me to the right solution?
    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which errors do you get in the website error.log file and in prestashop?
     
  3. arkehost

    arkehost New Member HowtoForge Supporter

    at first ,after upgrade to ispconfig 3.1.13 , was "client denied"
    i thought it was due to the upgrade. now relaunch update.sh and rebooted server.
    reinstall again stopped at firs step.
    i know have recreate subfolder for prestashop installation, re-chown subdir to web:client , restart apache, and now it hangs on var/log and app/logs which where not created by installer
    created app/logs and var/logs then chmod 775
    the installation goes
    but this process is sure not for a customer.
    i cant see other errors now.
    * update
    reinstalled all, no logs error, installation_error ---> cannot install
    1. PrestaShop installation needs to write critical files in the folder var/cache.Please review the permissions on your server.
    in folder shop/var/cache i see folder created with root
    root@web:/var/www/vvvv.it/web# ls -al shop/var/cache/
    drwxr-xr-x 3 root root 4096 Jan 4 16:28 .
    drwxr-xr-x 3 webxx clientyy 4096 Jan 4 16:28 ..
    drwxr-xr-x 2 root root 4096 Jan 4 16:28 prod

    Really have no idea of what is going on. Again no problem installing wordpress for same user or other users (same php 7.1 etc)
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What creates that shop/var/cache directory? Fix it with
    Code:
    cd shop/var
    chown -R webxx:clientyy cache
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Prestashop is not running as webxx user so it should not have any folders owned by root. I guess you might have run the prestashop update.sh or install file as root user which then created the temporary directories as root and not as webxx user. Try to chown all files recursively in that site with:

    chown -R webxx:clientyy /var/www/vvvv.it/web/*
     
    Taleman likes this.
  6. arkehost

    arkehost New Member HowtoForge Supporter

    thanks for your replies.
    To be sure, i chown again
    chown -R webxx:clientyy /var/www/vvvv.it/web/*
    but
    i'm installing through aps , trying to emulate a customer installation
    Yes, if i chown var/cache it's ok.

    loggin into ispconfig as customer and running installation APS Prestashop ---> it hangs.
    Only then , i enter via ssh to see customer folders and:
    re-chown shop folder ---> it goes to step 2 , but some folders are missing.
    looking at var/cache i can see that the installer create the
    ls -al shop/var/cache/
    drwxr-xr-x 3 root root 4096 Jan 4 16:28 .
    drwxr-xr-x 3 webxx clientyy 4096 Jan 4 16:28 ..
    drwxr-xr-x 2 root root 4096 Jan 4 16:28 prod


    Customer web folders before running APS installer from gui , as customer.
    ls -al vvv.it/web
    total 960
    drwx--x--x 10 webXX clientYY 4096 Jan 4 03:07 .
    drwxr-xr-x 18 root root 4096 Dec 20 2017 ..
    -rw-r----- 1 webXX clientYY 10086 May 8 2018 .htaccess
    -rw-r--r-- 1 webXX clientYY 400 Apr 15 2016 LEGGIMI.txt
    drwxr-xr-x 2 webXX clientYY 4096 Mar 7 2016 backup
    drwxr-xr-x 3 webXX clientYY 4096 Jun 10 2015 blogs
    drwxr-xr-x 2 webXX clientYY 4096 Mar 20 2016 error
    -rw-r--r-- 1 webXX clientYY 418 Apr 15 2016 index.php
    -rw-r--r-- 1 webXX clientYY 20 Jan 5 2018 info.php
    -rwxr-xr-- 1 webXX clientYY 1725 Dec 24 2017 manutenzione.html
    -rw-r--r-- 1 webXX clientYY 1362 Feb 23 2018 robots.txt
    drwxr-xr-x 27 webXX clientYY 4096 Jan 4 17:46 shop -------> PRESTASHOP SUBDIR FOR APS INSTALLER
    drwxr-xr-x 50 webXX clientYY 4096 Jan 4 16:10 stats
    -rw-r--r-- 1 webXX clientYY 20 Jan 4 03:07 test.php
    -rw-r--r-- 1 webXX clientYY 6878 Dec 27 17:12 wp-activate.php
    drwxr-xr-x 10 webXX clientYY 4096 Dec 27 17:12 wp-admin


    Folder shop AFTER APS Installer with installation_error
    root@web3:/var/www/vvv.it/web# ls -la shop/
    total 608
    drwxr-xr-x 27 webXX clientYY 4096 Jan 4 17:46 .
    drwx--x--x 10 webXX clientYY 4096 Jan 4 03:07 ..
    -rw-r--r-- 1 webXX clientYY 348 Jan 4 17:46 .eslintrc.json
    drwxr-xr-x 9 webXX clientYY 4096 Jan 4 17:46 Backoffice
    -rw-r--r-- 1 webXX clientYY 4943 Jan 4 17:46 INSTALL.txt
    -rw-r--r-- 1 webXX clientYY 183260 Jan 4 17:46 LICENSES
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 app
    -rw-r--r-- 1 webXX clientYY 1230 Jan 4 17:46 autoload.php
    drwxr-xr-x 2 webXX clientYY 4096 Jan 4 17:46 bin
    drwxr-xr-x 8 webXX clientYY 4096 Jan 4 17:46 cache
    drwxr-xr-x 24 webXX clientYY 4096 Jan 4 17:46 classes
    -rw-r--r-- 1 webXX clientYY 272611 Jan 4 17:46 composer.lock
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 config
    drwxr-xr-x 4 webXX clientYY 4096 Jan 4 17:46 controllers
    -rw-r--r-- 1 webXX clientYY 878 Jan 4 17:46 docker-compose.yml
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 docs
    drwxr-xr-x 2 webXX clientYY 4096 Jan 4 17:46 download
    -rw-r--r-- 1 webXX clientYY 2454 Jan 4 17:46 error500.html
    -rw-r--r-- 1 webXX clientYY 4733 Jan 4 17:46 images.inc.php
    drwxr-xr-x 18 webXX clientYY 4096 Jan 4 17:46 img
    -rw-r--r-- 1 webXX clientYY 1082 Jan 4 17:46 index.php
    -rw-r--r-- 1 webXX clientYY 1168 Jan 4 17:46 init.php
    drwxr-xr-x 10 webXX clientYY 4096 Jan 4 17:46 install
    drwxr-xr-x 7 webXX clientYY 4096 Jan 4 17:46 js
    drwxr-xr-x 3 webXX clientYY 4096 Jan 4 17:46 localization
    drwxr-xr-x 3 webXX clientYY 4096 Jan 4 17:46 mails
    drwxr-xr-x 58 webXX clientYY 4096 Jan 4 17:46 modules
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 override
    drwxr-xr-x 2 webXX clientYY 4096 Jan 4 17:46 pdf
    -rw-r--r-- 1 webXX clientYY 2620 Jan 4 17:46 robots.txt
    -rw-r--r-- 1 webXX clientYY 0 Jan 4 17:46 sitemap.xml
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 src
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 themes
    drwxr-xr-x 5 webXX clientYY 4096 Jan 4 17:46 tools
    drwxr-xr-x 4 webXX clientYY 4096 Jan 4 17:46 translations
    drwxr-xr-x 2 webXX clientYY 4096 Jan 4 17:46 upload
    drwxr-xr-x 3 webXX clientYY 4096 Jan 4 17:46 var
    drwxr-xr-x 41 webXX clientYY 4096 Jan 4 17:46 vendor
    drwxr-xr-x 2 webXX clientYY 4096 Jan 4 17:46 webservice

    Only folder created from APS with user root is var/cache
    root@web3:/var/www/vvv.it/web# ls -al shop/var/
    total 96
    drwxr-xr-x 3 webXX clientYY 4096 Jan 4 17:46 .
    drwxr-xr-x 27 web43 client12 4096 Jan 4 17:46 ..
    -rw-r--r-- 1 web43 client12 31 Jan 4 17:46 .htaccess
    -rw-r--r-- 1 web43 client12 33831 Jan 4 17:46 SymfonyRequirements.php
    -rw-r--r-- 1 web43 client12 42851 Jan 4 17:46 bootstrap.php.cache
    drwxr-xr-x 3 root root 4096 Jan 4 17:46 cache

    What i'm trying to understand is why:
    With security--> High, permission correctly chowned for customer, if customer create through aps the installation it hangs and create some folder as root?
    I need to find a reason, first for my security (root dirs?), and after to let customers run aps alone without digging with chown , chmod, etc
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that the aps package is not ok, the aps packages are not from ispconfig and it might be that some of them are not working correctly.
     
  8. arkehost

    arkehost New Member HowtoForge Supporter

    ok thank you. i'll retry manually.
     

Share This Page