WordPress.org

Ready to get started?Download WordPress

Forums

media upload problem (permission denied in /includes/file.php on line 348) (20 posts)

  1. m.p.van.velzen
    Member
    Posted 2 years ago #

    I upgraded to WP version 3.3 and tried uploading pics with the new and old uploader. but get this:
    Warning: copy(/home/admin/domains/howtovideos.nl/public_html/wp-content/uploads/2011/12/Picture-12.jpg) [function.copy]: failed to open stream: Permission denied in /home/admin/domains/howtovideos.nl/public_html/wp-admin/includes/file.php on line 348

    permissions for upload directory and down and 755

    anyone got an idea, couldnt find the issue in the masterlist.

    thanks!

  2. Sergey
    Member
    Posted 2 years ago #

    Same here. I had similar problem before and I fixed it somehow by changing upload directory folder name. But this is wrong to do cus you will have all previous images lost from the site.

    Using Arras theme, WP 3.3

  3. morphiaz
    Member
    Posted 2 years ago #

    same problem here too. is already a fix available without changing the name of folder "uploads"?

  4. m.p.van.velzen
    Member
    Posted 2 years ago #

    Maybe some of the wordpress people could react to this? since it happens since the upgrade to 3.3 and was working great before.

    Were there any changes to what process executes the uploading with the 3.3 upgrade? that could explain the difference in permissions.

  5. Mike
    Member
    Posted 2 years ago #

    Any update on this? I saw others suggest changing the upload folder permissions to 777 fixed it, but I tried that and the problem persists. The odd thing is, I can upload images via the Media section of the Admin panel, but not from the Edit Post page.

  6. kellypeterson
    Member
    Posted 2 years ago #

    Hi everyone here,
    Currently I only have 14 nos. low res image in the media library. This error came up when I tried to upload a new one.

    Fatal error: Out of memory (allocated 68681728) (tried to allocate 1024 bytes) in /home/kelly/public_html/wp-includes/media.php on line 1010

    Does anyone know what it means? Please help...Thanks.

  7. Mike
    Member
    Posted 2 years ago #

    @kellypeterson, that's a totally different problem, please start a new thread.

  8. kellypeterson
    Member
    Posted 2 years ago #

    Thanks Mike.

  9. Cengolino
    Member
    Posted 2 years ago #

    Hi, I lived same problem. I've just changed a line and it worked.
    Open the file below
    /home/admin/domains/YOUR WEB SITE/public_html/wp-admin/includes/file.php
    Go line 348
    It's like that
    copy( $tmp_file, $new_file);

    I changed new_file to filename :)
    copy( $tmp_file, $filename );

  10. nielsdolieslager
    Member
    Posted 2 years ago #

    I tried that, didn't work for me. Any news on another solution? I'm just starting a website, can't use any custom pictures like this.

  11. Morigirth
    Member
    Posted 2 years ago #

    I had the same problem and found this somewhere and it worked for me:

    Got to Settings > Media
    And then uncheck "Organize my uploads into month- and year-based folders"

    Cheers!

  12. nielsdolieslager
    Member
    Posted 2 years ago #

    Thanks, will save this solution. It works for me to change permission to 777.

  13. traypup
    Member
    Posted 2 years ago #

    Has anyone sorted out this issue? I've checked all of my permissions and done a load of troubleshooting and still no love.

  14. Mike
    Member
    Posted 2 years ago #

    I used the same work-around that @Morigirth posted (2 posts before yours).

  15. traypup
    Member
    Posted 2 years ago #

    Thank you Mike. That didn't work for me, either.

  16. traypup
    Member
    Posted 2 years ago #

    It turns out that my php handler was set to one that didn't play nice with this function. Here's what my server guy said:

    We normally recommend switching your PHP handler to either FCGI or suPHP. Both of these are going to work as they will make Apache run as the cPanel user and thus get rid of the permission issues. FCGI will allow you to also run opcode caching software like APC. The only downfall is that FCGI uses more memory then what DSO(your current PHP Handler) uses. suPHP will not allow you to run opcode caching and will not use more memory however, it does use more CPU then any of the other PHP handlers. It has been around longer then FCGI so more people are familiar with it as well. It is going to depend on your preference as to what you want to switch to. Do you want to use more memory or more CPU?

    We switched it to suPHP and it seems to be working ok now.

    (also posted this in my own forum post)

  17. tuanla6
    Member
    Posted 1 year ago #

    Thanks @Morigirth
    I have same problem and i did with @Morigirth's solution and it worked

  18. fastfivedesigners
    Member
    Posted 1 year ago #

    Hi Mates , we Solved this problem for one of our client website .

    Here is the Solution .You need to follow these 2 steps.

    1. By using FTP or control panel access you need to changed "uploads" folder permission . Here is the Relative path /public_html/wp-content/uploads .

    Go here /public_html/wp-content by using file manager or Any FTP software Like Filezilla & then right click over 'Uploads' folder & changed file permissions to 777 .

    2. Inside WordPress admin panel .. Go to tab. 'Settings' > 'Media'
    And then uncheck 'Organize my uploads into month- and year-based folders' and then save changes :)

    That it .Refresh WordPress backend page and then try upload image :)

    Thanks

    [ Signature moderated. ]

  19. kunthea
    Member
    Posted 1 year ago #

    Hi, I have try to follow the solve above but problem is it not allow me to change permission, it said: 550 Could not change perms on uploads: Operation not permitted.

    anyone have idea?

    thanks/Kunthea

  20. drapdesigns
    Member
    Posted 1 year ago #

    Make sure that you are successfully set the permission. for me I thought giving a 777 permission wont work until I found out that command are 500 error. so i go directly to hosting to change permission to 777 and it works.

Topic Closed

This topic has been closed to new replies.

About this Topic