User avatar
http://www.wpzoom.com/tutorial/fixing-stretched-images/


Last edited by Pavel on Thu Oct 11, 2012 2:16 pm, edited 13 times in total.

Jick,

I just read your post: [Tip] Image Display Issues and I have to take exception to your advice. Changing permissions to 777 (if 755 doesn't work), is a bad idea, as it essentially turns off ALL security and authentication on the folder and makes everything readable/writeable/executable to the World. Incidentally, this is why it probably solves the problem, but it's bad practice and leaves you open to getting your site hacked.

In my experience these kinds of issues are typically caused by the folders not having the the proper OWNER, which may need to be the Apache user that WordPress runs as, on the server. This problem can easily be caused by manually installing plugins and themes, through FTP, because you are often accessing the server as the FTP user (instead of the WordPress/Apache user) and anything you upload will be owned by the FTP user by default.

I've had this problem in the past (after moving to a Virtual Private Server) where I could not upload media from inside WordPress using the uploader, and none of my images from the image library would display on the pages. The first time the issue was resolved by changing the owner of the the wp-content/uploads folder to the Apache user, instead of FTP user. The most recent time (after moving hosts), the issue was resolved by the hosting provider implementing SuPHP as our PHP handler on the server.

Here's a pretty good discussion of the issue in the context of installing a CMS:
http://mt5.radified.com/blog/2010/01/suphp-apache-web-server-modx-777-security.html

TO return to the Image Display problem, I would suggest checking the ownership of the folders specified (using an FTP client):
  • /wp-content/themes/[YOUR-THEME]/scripts/
  • /wp-content/themes/[YOUR-THEME]/scripts/cache

See if the owner:group values match those of the other Wordpress files and folders. (In Filezilla the owner:group values are the leftmost column of the directory listing and can be either numbers or text, such as 99:503 or nobody:psacln)

How to resolve this issue will depend on what kind hosting package you have, and how your server is configured. I would highly recommend discussing this issue with your hosting provider tech support to see if they can help you with a secure solution before changing any permissions on internal WorPress folders.

If you happen to have SSH access to your server (or you can set it up) you can try changing the ownership yourself using the CHOWN command. You'll need to poke around in your WordPress files through FTP and see what the owner:group values are and if there are any inconsistencies. Not being very fluent in Linux myself, I'd suggest reading up on SSH and the CHOWN command before trying it. You hosting provider may also have knowledgebase or support articles that can guide you through these operations.

Jick, I hope you take this in the spirit of helpfulness with which it's meant. After having two WordPress sites taken down last year by hacking and malicious code insertions I've become a little more hardline about security. The WordPress.org Forums are full of people casually instructing others to simply change permissions on folders to 777 to fix various problems. It may well make the issue go away, but it's bad advice and you follow it at your own risk.

Christopher

_________________
--Christopher
User avatar
Christopher,

Sorry about that. I should have done more explanation in the areas you're referring too but I guess I didn't think about that. I'll update the post immediately to reflect your recommendations. ;)

Thanks for the tip Christopher.

_________________
James Dimick
Thanks, James.

This is a very common issue with WordPress and I understand the need to have a solution for folks. Unfortunately, things aren't always simple when it comes to web servers.

Cheers,

Christopher

_________________
--Christopher

Reply