Recursive write permissions on files and folders: Prestashop installation

11,965

Solution 1

I know this is old but best way is to do the following:

sudo chown -R user:www-data /var/www/prestashop
sudo chown g+w -R /var/www/prestashop

The above gives user access make sure you add user to www-data group 1st g+w gives write permissions to group

Solution 2

Change the ownership of the files under Prestashop directory to allow web-server user to write

sudo chown -R www-data:www-data /var/www/prestashop

Disable SELinux (better to configure SELinux to allow prestashop directory to do his stuffs)

setenforce 0 

Solution 3

On Ubuntu Linux: you need to give the apache web server (whose user name and group name is www-data) permission to do stuff on the files in the filesystem under prestashop.

# cd /var/www/prestashop
# chown -R www-data *
# chgrp -R www-data *

Refresh the prestashop install page and that particular problem should be gone.

Share:
11,965
Nitish
Author by

Nitish

Updated on September 18, 2022

Comments

  • Nitish
    Nitish over 1 year

    I am trying to install Prestashop in my Linux machine. But it says

    Recursive write permissions on files and folders:
    ~/config/
    ~/cache/
    ~/log/
    ~/img/
    ~/mails/
    ~/modules/
    ~/themes/default/lang/
    ~/themes/default/pdf/lang/
    ~/themes/default/cache/
    ~/translations/
    ~/upload/
    ~/download/
    ~/sitemap.xml 
    

    And I got some red cross marks in it. But I gave a 777 permission to the prestashop directory chmod -R 777 prestashop.

    • Eir Nym
      Eir Nym about 11 years
      try to set 755 for folders and 644 for files: find ~ -type d|xargs chmod 755 && find ~ -type f |xargs chmod 644
    • ganesh
      ganesh over 6 years
      NEVER never never use permission 777. 1) it is overkill. 2) It opens up everything for anybody. 3) It is so bad that several programs even refuse to work when they detect this setup. (example ssh)
  • Jason Posit
    Jason Posit almost 11 years
    The other steps to get everything to proceed normally is: sudo apt-get install tasksel; sudo tasksel install lamp-server