Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrestaShop docker Permission denied after " Launching the installer script..." #354

Open
PiotrBracha opened this issue Sep 14, 2023 · 0 comments

Comments

@PiotrBracha
Copy link

PiotrBracha commented Sep 14, 2023

I use presta with image: prestashop/prestashop:latest, which results 1.7.8.0 version (quite strange, because presta has higher versions than this one). "Permission denied" in "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:183" related with removal operation of the file "/var/www/html/var/cache/prod/class_index.php".

Docker version 24.0.5, build ced0996
docker-compose version 1.26.2, build eefe0d31
nginx/1.18.0 as a proxy for https and subdomain

Docker container logs below:

prestashop_1  | * Launching the installer script...
prestashop_1  | PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Failed to remove file "/var/www/html/var/cache/prod/class_index.php": unlink(/var/www/html/var/cache/prod/class_index.php): Permission denied in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:183
prestashop_1  | Stack trace:
prestashop_1  | #0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php(177): Symfony\Component\Filesystem\Filesystem->remove(Array)
prestashop_1  | #1 /var/www/html/classes/Tools.php(3558): Symfony\Component\Filesystem\Filesystem->remove(Array)
prestashop_1  | #2 [internal function]: ToolsCore::{closure}()
prestashop_1  | #3 {main}
prestashop_1  |   thrown in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php on line 183
prestashop_1  | Symfony\Component\Filesystem\Exception\IOException: Unable to write to the "/var/www/html/var/cache/prod" directory. in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:680
prestashop_1  | Stack trace:
prestashop_1  | #0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile('/var/www/html/v...', '<?php\n\nuse Symf...')
prestashop_1  | #1 /var/www/html/modules/ps_checkout/vendor/prestashop/module-lib-service-container/src/DependencyInjection/ContainerProvider.php(95): Symfony\Component\Config\ResourceCheckerConfigCache->write('<?php\n\nuse Symf...', Array)
prestashop_1  | #2 /var/www/html/modules/ps_checkout/vendor/prestashop/module-lib-service-container/src/DependencyInjection/ServiceContainer.php(79): PrestaShop\ModuleLibServiceContainer\DependencyInjection\ContainerProvider->get('admin')
prestashop_1  | #3 /var/www/html/modules/ps_checkout/vendor/prestashop/module-lib-service-container/src/DependencyInjection/ServiceContainer.php(61): PrestaShop\ModuleLibServiceContainer\DependencyInjection\ServiceContainer->initContainer()
prestashop_1  | #4 /var/www/html/modules/ps_checkout/ps_checkout.php(1404): PrestaShop\ModuleLibServiceContainer\DependencyInjection\ServiceContainer->getService('ps_checkout.con...')
prestashop_1  | #5 /var/www/html/modules/ps_checkout/ps_checkout.php(1101): Ps_checkout->getService('ps_checkout.con...')
prestashop_1  | #6 /var/www/html/classes/PaymentModule.php(65): Ps_checkout->addCheckboxCarrierRestrictionsForModule()
prestashop_1  | #7 /var/www/html/modules/ps_checkout/ps_checkout.php(179): PaymentModuleCore->install()
prestashop_1  | #8 /var/www/html/src/Adapter/Module/Module.php(251): Ps_checkout->install()
prestashop_1  | #9 /var/www/html/src/Core/Addon/Module/ModuleManager.php(312): PrestaShop\PrestaShop\Adapter\Module\Module->onInstall()
prestashop_1  | #10 /var/www/html/src/PrestaShopBundle/Install/Install.php(1069): PrestaShop\PrestaShop\Core\Addon\Module\ModuleManager->install(NULL)
prestashop_1  | #11 /var/www/html/src/PrestaShopBundle/Install/Install.php(1036): PrestaShopBundle\Install\Install->installModules(Array)
prestashop_1  | #12 /var/www/html/removeinstall/controllers/console/process.php(298): PrestaShopBundle\Install\Install->installModulesAddons()
prestashop_1  | #13 /var/www/html/removeinstall/controllers/console/process.php(155): InstallControllerConsoleProcess->processInstallAddonsModules()
prestashop_1  | #14 /var/www/html/removeinstall/classes/controllerConsole.php(117): InstallControllerConsoleProcess->process()
prestashop_1  | #15 /var/www/html/removeinstall/index_cli.php(64): InstallControllerConsole::execute(17, Array)
prestashop_1  | #16 {main}
prestashop_1  |
prestashop_1  |
prestashop_1  | * Checking if mysql is available...
prestashop_1  |
prestashop_1  |
prestashop_1  | * DB server mysql is available, let's continue !
prestashop_1  |
prestashop_1  |
prestashop_1  | * PrestaShop Core already installed...
prestashop_1  |
prestashop_1  |
prestashop_1  | * Almost ! Starting web server now

I use docker-compose.yml:

    image: prestashop/prestashop:latest
    volumes:
      - ./viesintegration:/var/www/html/modules/viesintegration
    restart: always
    environment:
      PS_DOMAIN: demo.example.com
      PS_FOLDER_ADMIN: ${PS_FOLDER_ADMIN}
      PS_FOLDER_INSTALL: ${PS_FOLDER_INSTALL}
      PS_ENABLE_SSL: 1
      PS_INSTALL_AUTO: 1
      PS_ERASE_DB: 1
      PS_INSTALL_DB: 1
      DB_SERVER: ${DB_SERVER}
      DB_USER: ${DB_USER}
      DB_PASSWD: ${DB_PASSWD}
      DB_NAME: ${DB_NAME}
      DB_PREFIX: ${DB_PREFIX}
      ADMIN_MAIL: ${ADMIN_MAIL}
      ADMIN_PASSWD: ${ADMIN_PASSWD}
    ports:
      - "8081:80"
    depends_on:
      - mysql

  mysql:
    image: mysql:5.7
    restart: always
    volumes:
      - mysql:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: ${MYSQL_DATABASE}
      MYSQL_USER: ${MYSQL_USER}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}

volumes:
  mysql:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant