Can't upload image from backoffice prestashop

Posted February 24, 2016 5.2k views


I can’t upload any image or plugin from the backoffice prestashop, when I set the permission of upload folder to 777 it’s work fine, but i must put 755 for reason of security,

My website run under apache2, ubuntu 15.02

Any help please

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

You should be able to correct this by ensuring the proper ownership of the files rather than setting them to 777. The Apache process on Ubuntu runs as the user www-data. Assuming your web files are in the default directory of /var/www/html, the following command will set the ownership properly and should allow files to be written without the 777 permissions on them.

sudo chown -Rf www-data:www-data /var/www/html