1

I will be using Magento Connect to upgrade to 1.9.3 via the server. It is a shared server so the "www-data" user does not have owner privileges on our files.

Many threads recommend setting all files and directories to 777. But afterwards how should I reset permissions. I found a fairly good looking script at

https://community.bitnami.com/t/correct-folder-and-files-permission/25282

which suggests: Set the correct group and owner to the htdocs folder:

sudo chown -R bitnami:daemon /opt/bitnami/apps/magento/htdocs

Set the correct permissions to file and folders:

sudo find /opt/bitnami/apps/magento/htdocs -type d -exec chmod 755 {}\;

sudo find /opt/bitnami/apps/magento/htdocs -type f -exec chmod 644 {} \;

Set the correct permissions to the mage directory files:

sudo find /opt/bitnami/apps/magento/htdocs/mage -type f -exec chmod 755 {} \;

Set the correct permissions to other writable folders:

sudo find /opt/bitnami/apps/magento/htdocs/media/ -type d -exec chmod 775 {} \;

sudo find /opt/bitnami/apps/magento/htdocs/media/ -type -f -exec chmod 664 {} \;

sudo find /opt/bitnami/apps/magento/htdocs/var/ -type d -exec chmod 775 {} \;

sudo find /opt/bitnami/apps/magento/htdocs/var/ -type -f -exec chmod 664 {} \;

sudo find /opt/bitnami/apps/magento/htdocs/app/etc/ -type d -exec chmod 775 {} \;

sudo find /opt/bitnami/apps/magento/htdocs/app/etc/ -type -f -exec chmod 664 {} \;

but looking at our permissions with:

find . -printf "%h,%f,%CY-%Cm-%Cd,%u,%g,%m\n" > ~/files.csv

and going through in excel it seems more complicated than that.

is there a definitive script to set the permissions correctly after upgrade from 1.9.2.2 to 1.9.3 ?

Thanks in advance,

Al

  • NO. Donot set all 777. Recursively set 644 for files and 755 for folders. if needed, you could set 777 for var and media folder. – Shyam Krishna Sreekumar Nov 3 '16 at 11:45
  • ty Shyam. I think I might need 770 to use connect manager to do upgrades though as I get permisions error on upgrade (and a maintenance flag left in /htdocs) – alThePal Nov 3 '16 at 11:50
  • ok, asre you trying to upgrade magento version? – Shyam Krishna Sreekumar Nov 3 '16 at 12:00
  • yes from 1.9.2.2 to 1.9.3 – alThePal Nov 3 '16 at 12:01
  • ok. however i wont suggest you to upgrde to 1.9.3 as so many users are struggling with it. Try to upgrade to 1.9.2.4. Regarding to your issue, since its a shared server i think you dont have shell(ssh) permission, right? Also can you edit the question and add the actual issue with a screenshot of the error you are getting when you are trying to upgrade? – Shyam Krishna Sreekumar Nov 3 '16 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.