1

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.

2
  • 2
    try to set 755 for folders and 644 for files: find ~ -type d|xargs chmod 755 && find ~ -type f |xargs chmod 644
    – Eir Nym
    Commented Mar 23, 2013 at 6:09
  • 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)
    – Hennes
    Commented Oct 1, 2017 at 14:45

3 Answers 3

3

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

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 
1

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.

1
  • The other steps to get everything to proceed normally is: sudo apt-get install tasksel; sudo tasksel install lamp-server Commented May 30, 2013 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .