PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, June 30, 2022

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

 June 30, 2022     centos, php, prestashop     No comments   

Issue

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:

  • centos 7
  • PHP 7.3.14

Solution

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



Answered By - Robertino Vasilescu
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing