Resetting File Permissions for Magento

Resetting File Permissions for Magento

Magento Web Design Jan 14, 2016 Magento Resources 0

Why would I need to change my File Permissions?

Magento Connect Manager tends to change file permissions to 777. When the file has been changed to this status, it cannot be executed, creating an internal server error.

How do I change my File Permissions?

Resetting permissions is relatively simple and can be done with a single command. To get started, use an SSH client of your choice. We like Putty: SSH is enabled on most accounts by default.

If you are on Windows 7, it is advised that you open telenet:

SSH Settings:

  • cPanel username = SSH username
  • cPanel password = SSH password
  • port = 22
  • Host Name (or IP address) = Domain Name or Server Name or Server Gateway IP or Dedicated IP

First we need to go to the directory where Magento is installed. If it’s in the root, it would be in /home/user/public_html where “user” is your own username for this account. If Magento is installed in a folder, add the folder path as necessary:

cd /home/user/public_html/

Then execute the following commands on the directory where your Magento is installed:

find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;
chmod 550 pear
chmod 550 mage #for magento 1.5+

After these simple steps, the file’s permissions should be changed successfully!