Can't upload image from backoffice prestashop

February 24, 2016 864 views
Apache PHP Ubuntu


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

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
Have another answer? Share your knowledge.