After uploading an image to WordPress (version 2.3.3) the thumbnail of the image was not displaying. This was because the thumbnail had the wrong permissions (660). More people seem to have this problem. I fixed this problem by setting the permissions of the thumbnail after it has been move to its target.

The file to fix is wp-admin/includes/image.php. After inserting the following code at line 93 the problem is solved:

if (!chmod($thumbpath, 0644))
	$error = __( "Setting thumbnail permissions failed" );

Update: This problem has been solved in WordPress 2.5

[Print]

One Response to “WordPress thumbnail permissions fix”

  1. alanf says:

    Hi there, many thanks for this fix it worked well for me. Seems that some web hosts have default unix write permissions (umasks?) set up badly.

    One correction to your post is that the file should be wp-admin/includes/image.php and not wp-admin/includes/import.php

    so on line 93 of image.php I added your line and the thumbnails in wordpress now dislay.

    Thanks again

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash

© 2010 Marcel Suffusion WordPress theme by Sayontan Sinha
Bear