Support » Fixing WordPress » Cannot upload images: Permission denied in file.php on line 348

  • I am getting an error every time I upload media through the WordPress media uploader. No matter what, I always get this error:

    Warning: copy(/wp-content/uploads/2012/04/image.png) [function.copy]: failed to open stream: Permission denied in /wp-admin/includes/file.php on line 348

    I have searched Google and found many others are having this issue as well. I have tried all the fixes I have found so far and nothing works.

    What I have tried:
    -Setting permissions of wp-content/uploads to both ‘777’ and ‘775’
    -Reinstalling WordPress
    -Turning off the setting that sorts images into folder names based on the date

    Any help would be greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator t-p


    -make sure images are not blocked by hotlink protection, contact your webserver.

    – check path in Admin => Settings => Media, set

    – make sure wp-content/upload folder is writable (try 766, 767. or 777 permission).

    – If the above steps do not help, try deactivating ALL plugins temporarily to narrow down the problem. If the problem goes away, activate them individually (one-by-one) to find the problematic plugin.

    Thank you but I tried those fixes already, I think it has something to do with my Apache/LiteSpeed server, I read somewhere that I have to give WordPress permission through Apache. This started happening right after my webhost provisioned a new container for our website after we got hacked.

    Find a solution? I’m having the same issue. Yesterday I could upload images, today I can’t. Checked the error log and saw the same error you’ve got.

    I reinstalled Apache and it works fine now

    I have the same prolem since the beginning I installed WordPress – got losts of advice via the forum but it is still not resolved. after again a reinstallation of WP (for a different domain), now the upload folder can’t even be created, even with permissions 775 or 777. i’m not running on apache, so that can’t be the problem. Any help is very very welcome!!

    Since I have installed, and reinstalled again and again wp, i still have this problem.
    so far, i have not been able to get a wp site running at all with my photography.
    yes, i have read all posts from the last two years with possible solutions and executed all suggestions. also i have received feed back on my earlier inquiry (see above) how to solve this problem (thank you so much for that), but still: it is not working!
    only resolution i have not been able to try is this: i don’t know how to make an .htaccess file in my wp-admin directory. that would be the last resort. I would really appreciate if someone could instruct me how to do this. hopefully that is the resolution to my media upload problem. again: thank you for the effort!

    @ quartel

    Same problem

    Have you solved your problem?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot upload images: Permission denied in file.php on line 348’ is closed to new replies.