Can't upload image from backoffice prestashop


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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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