Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was unable to install a module using Magento Connect, getting a Connection Error try again later error. Following the instructions of the module developer I attempted to fix permissions in the document root with:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

It still didn't work so I ended up installing the module manually. I then logged into the admin backend and Magento was trying serve CSS files using the system file paths instead of URLs like so:

<link rel="stylesheet" type="text/css" href="/home/user/public_html/js/calendar/calendar-win2k-1.css" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/reset.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/boxes.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/custom.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/xmlconnect/boxes.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/menu.css" media="screen, projection" />

I immediately removed the extension and tried to match the perms from another server with a working Magento to no avail. I have also:

  • Cleared local, APC, and Magento caches
  • Looked in error logs (logging is enabled)
  • double-checked proper values of web/unsecure/base_url and web/secure/base_url in the DB
  • Rebooted, 3 times ;)

Minify is not being used. Merge CSS files are enabled, however I cannot figure out how to disable without the admin interface (save and navigation isn't working, even when I replace the correct values with Firebug). Any ideas would be greatly appreciated!

(Question originally posted by @reflexiv on Stack Overflow)

share|improve this question
    
Enable exception log and check if all the files exist. – joseantgv Oct 27 '15 at 9:26
up vote 12 down vote accepted

Magento using full path urls to access CSS files is a common error that results in two things happening:

  • Having Merge CSS Files Enabled
  • Magento being unable to read/write to the media/ folder.

To fix this issue, please ensure that:

  • The media/ folder exists in your Magento installation.
  • The media/ folder is writable by your web server.

As @flochtililoch posted on Stack Exchange:

You should check that apache actually owns the media directory, by checking first which user apache is running as, and then adjusting permissions accordingly:

chown -R <apache_user> media
chmod -R o+w media

More information here: Magento Filesystem Permissions

share|improve this answer
    
I had the same issue because of CSS/JS merge was enabled. – DmitryR Feb 16 '15 at 17:49
1  
@DmitryR: Having merge enabled is itself not the problem, the web server not being able to write to media is the problem. It attempts to do so when merge is enabled, fails, and this results. ;) – Navarr Feb 16 '15 at 18:12
    
Thanks for details, @Navarr! – DmitryR Feb 17 '15 at 10:01

Give 777 permission to var directory an all subdirectories...

chmod 777 /your_website_root_directory/var -R

share|improve this answer
3  
This is bad advice - Firstly this question was answered already with an accept and multiple upvotes. Second, there is breakage in that 777 actually means 0777 so setuid / setgid are now broken. Read more here: serverfault.com/questions/364677/why-is-chmod-r-777-destruct‌​ive askubuntu.com/a/20110 – philwinkle May 24 '16 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.