0

I once moved my wordpress directory one level up on my server (its now in the root). Everything seems to work fine for a while but niow i'am starting to have troubles with uploading images.

When i try to include an image by uploading it from my computer wordpress throws an "Permission denied" error:

copy(/home/bram/domains/dutchmountaineer.com/public_html/wp-content/uploads/2012/05/Costa-Rican-Frog.jpg)

[function.copy]: failed to open stream: Permission denied in 
/home/bram/domains/dutchmountaineer.com/public_html/wp-admin/includes/file.php on line 348
    618

I tried setting the uploads and includes folder to 777 which had no effect. I have set them back to 755.

Any help please!

Jorrit

EDIT:

I tried changing the full path (in media settings) but it was of now help. I think it since i moved the wp installation from /wp/ to the root of my server

jorrebor
  • 2,166
  • 12
  • 48
  • 74

3 Answers3

1

Check who owns the directory. It may be possible that you need to add www-data to the group. Weird, yes, but I sometimes encounter scenarios where even files and directories with 777 are denying me access if I don't add my user to the owner group.

Merioles
  • 268
  • 2
  • 12
0

It means you are getting error near this code

    // Copy the temporary file into its destination
$new_file = $uploads['path'] . "/$filename";
copy( $tmp_file, $new_file );
unlink($tmp_file);

check your settings under settings->Media tab in admin panel and check you have the appropriate permissions for the folder, you can change the upload path as well. Let me know if problem still persists.

Image

swapnesh
  • 26,318
  • 22
  • 94
  • 126
-2

You have to allow uploads directory 777 rights and check your folder user and ftp user are same or not.

Huzoor Bux
  • 1,026
  • 4
  • 20
  • 46
  • "You have to allow uploads directory 777..." Absolutely wrong. 777 permissions are never necessary except in temporary cases where they are set back to 755 or tighter. See http://codex.wordpress.org/Changing_File_Permissions – markratledge May 08 '12 at 12:35