Magento 1.9 – Fix 403 Error for Admin Images and JS

adminerrorfile-permissionsmagento-1.9permissions

I am going through the painstaking process of upgrading from 1.6 to 1.9

I choose to do a fresh install of 1.9 instead of each variation.

I followed these steps and seem to have gotten pretty good results but with some hiccups along the way.

(This answer is what I used for the upgrade: https://stackoverflow.com/questions/24043812/how-to-upgrade-magento-1-6-to-magento-1-9)


Problem:
When I log into the admin.. nothing is clickable or updatable, also the Magento logo does not appear, but the files are on the server and the are linked with the correct paths.

When I go to a .js file or image file I am getting a 403 forbidden access to this resource on the server denied!

I'm pretty sure this is an .htaccess issue with permissions but I have been playing with it and no luck.

NOTE: FIXED THIS, May Be Related: I was getting a warning first time i logged into admin and it was because an .htaccess file was missing in the app/etc/ directory… I added it with deny and that warning is now gone in the admin screen.


UPDATE! The permissions for the /skin/adminhtml/default/default/images

The folder Dir are set to 755, but the files themselves are set to 644

  • I changed the logo file to 755 – and now it pops up on the admin page…

Is there a correct way to set all these files including the JS files to 755 so its not 403? I could try and go in there 1by1 but I assume there is a better way and correct way for the rest of the store not getting these errors…

Please see screenshot of admin with console current trouble:

Assume:
So assume this has something to do with global access.

Best Answer

You should only use 755 for directories and 644 for files (they don't need the executable permission).

Use these commands in the skin directory to apply the permissions recursively:

find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;

The first line finds all files and chmods them to 644, the second line finds all directories and chmods them to 755.

See also: Files and Folders permission issue after I copied all files