PrestaShop / docker

🐳
https://hub.docker.com/r/prestashop/prestashop/
MIT License
263 stars 180 forks source link

NoPermissions (FileSystemError): Error: EACCES: permission denied #258

Closed iRoberto83 closed 3 years ago

iRoberto83 commented 3 years ago

Hi, I'm using this container with wsl and vscode. I can't edit any of html files because I got errors like: Failed to save 'content.tpl': Unable to write file 'vscode-remote://wsl+ubuntu/home/roberto/sites/prestashop/html/admin123/themes/default/template/controllers/login/content.tpl' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/roberto/sites/prestashop/html/admin123/themes/default/template/controllers/login/content.tpl') I've also tried to edit permissions with sudo chown -R roberto html but prestashop stopped to work until I've rolled back with: sudo chown -R www-data html

That's my docker-compose file:

version: "3.9" services: prestashop: image: prestashop/prestashop:1.7-7.3-apache depends_on:

PierreRambaud commented 3 years ago

Yes because you're using docker images the default user for apache2/nginx is www-data If you want to make it work you need to use something like this: https://github.com/PrestaShop/PrestaShop/blob/develop/docker-compose.yml https://github.com/PrestaShop/PrestaShop/tree/develop/.docker

iRoberto83 commented 3 years ago

Yes because you're using docker images the default user for apache2/nginx is www-data If you want to make it work you need to use something like this: https://github.com/PrestaShop/PrestaShop/blob/develop/docker-compose.yml https://github.com/PrestaShop/PrestaShop/tree/develop/.docker

Hi @PierreRambaud , I've solved adding my user to www-data group and chmod 775 on all the files. I'll take a look to your files for embedding in my environment.

matks commented 3 years ago

Closing as topic seems over. Thanks @iRoberto83 for telling us.