I'm having trouble uploading a custom image into Wordpress' dashboard. It says that it needs to be a custom 1000x288 image. When I upload it, I get the error of:
Warning: copy(/var/sites/zeldezine/wordpress/wp-content/uploads/2012/02/header.jpg) [function.copy]: failed to open stream: Permission denied in /var/sites/zeldezine/wordpress/wp-admin/includes/file.php on line 348
Warning: getimagesize(/var/sites/zeldezine/wordpress/wp-content/uploads/2012/02/header.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /var/sites/zeldezine/wordpress/wp-admin/custom-header.php on line 665
When I open /includes/file.php, I get this block of code on line 348
// Set correct file permissions
$stat = stat( dirname( $new_file ));
$perms = $stat['mode'] & 0000666;
@ chmod( $new_file, $perms );
but I am not experienced enough in PHP to be able to know how to set the permissions correctly. If anyone can give me a heads up on what I need to modify to set permissions correctly, I'd appreciate it.
/uploads
... as a test, set the permissions on/var/sites/zeldezine/wordpress/wp-content/uploads/2012/02/
to 0777 and see if it works. – Ben D Feb 8 '12 at 3:42