Resetting File Permissions for Magento

Resetting File Permissions for Magento

audio
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: www.putty.org. SSH is enabled on most accounts by default.

If you are on Windows 7, it is advised that you open telenet:
http://help.hover.com/tutorials/hover/manual/1381/11977-enable-telnet-windows-vista-windows-7/.

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:

1
cd /home/user/public_html/

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

1
2
3
4
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!