Kinderek
Kinderek

Reputation: 13

How to fix permissions error with prestashop on centos 7 apache?

Installing Prestashop 1.7.6.2 An error has occured:

You need to grant write permissions for PHP on the following directory: /var/www/html/presta

This error appears while installing Prestashop. It's staying with 0%.

I have:

Upvotes: 1

Views: 6185

Answers (2)

Robertino Vasilescu
Robertino Vasilescu

Reputation: 1078

change var/www/html/presta owner to www-data if you're using apache or to nginx if you're using nginx.

chown -R www-data:www-data /var/www/html/presta

But DO NOT change permissions to 777 since this wil open your site completely, change directories to 0755 and files to 0644 instead.

Inside shop root folder:

find . -type f -exec chmod 644 -- {} + to set proper permissions for all files

find . -type d -exec chmod 755 -- {} + to set proper permissions for all directories

chmod 666 .htaccess to set proper permissions for .htaccess

Upvotes: 3

Kinderek
Kinderek

Reputation: 13

I've used apache:apache and somehow it's working. But right now i've got another problem: PrestaShop installation needs to write critical files in the folder var/cache. Please review the permissions on your server.

Upvotes: 0

Related Questions