WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Media Upload Problem (The uploaded file could not be moved to error) (42 posts)

  1. s_ha_dum
    Member
    Posted 4 years ago #

    Arghh... that should be 'set permissions to 775'.

  2. rachel@kathys
    Member
    Posted 4 years ago #

    Thanks all you lovely people. Switching off organise my uploads, and manually creating wp-content/uploads and setting just this file to 777 has worked for me.

    Images are now uploading.

  3. johanl
    Member
    Posted 4 years ago #

    WTF... stop telling people to set permissions to 777 !!!!

    It means that anyone logged in to the server can replace your uploaded pictures of your lovely family with pictures of god knows what!

    The last '7' of the three is the sum of the permissions read(4), write(2) and execute(1) for "others".

    Make sure the uploads directory and its sub directories have group ownership set to the apache users primary group (usually 'apache').

    Then chmod all directories to 770 (which means owner and group has read/write/execute rights on the directories).

    It's a good idea to create all directories manually for a couple of years ahead! With all the month directories as well.

    /johan

  4. TypecastFilms
    Member
    Posted 4 years ago #

    Just got this figured out.

    In simpler terms:

    1. Create a phpinfo page, if you don't already have one.
    2. Scroll down to "apache2handler" and look for "User/Group."
    3. Remember the name listed for the user. My entry was apache(#)/#, the name was "apache."
    4. Log into a terminal as the root user. Google this step if you need help here.
    5. Navigate to the folder just above where your WP is installed. Mine is installed to the root directory (httpdocs), so it was at var/www/vhosts/mydomain.com
    6. Type chown -R (your the username from earlier) (your wp directory)/ - for me, chown -R apache httpdocs/. This changes the ownership of the directory to apache.
    7. Navigate to your wp-content folder: httpdocs/wp-content/
    8. Type chmod -R 766 uploads/. This changes permissions so that apache can read, write, and execute there.

    This worked for me. Hopefully others who find this thread through Google (like I did) will find this useful.

  5. VirtualSanity
    Member
    Posted 4 years ago #

    Yeaaaaaaaaaaaaaaaah!

    Now it's working for me too...

    I needed to include the permission to all sub files, and finally it is working fine. I think it is a bug on the new WP because i just got this problem after updating.

    Cheers and thanks!

  6. DanielCardenas
    Member
    Posted 4 years ago #

    @TypecastFilms - Thanks! - I modified your solution and it worked for me. I didn't want to chown the entire wp dir, so I only chowned & chmoded the uploads dir.
    @johanl - word. People! - opening your uploads dir to the world via chmod 777 is a wee bit insecure (IMHO).

  7. sbyholm
    Member
    Posted 4 years ago #

    I have the same problem, Images will not upload on a brand new install of the latest version of WP - 2.9.1

    Chmodding the public_html folder (where wp is installed) to 777 solves the problem. Not a useful solution though... have to try getting the group changes for public_html but I'm not sure I can do it

    Simon

  8. nextstreet
    Member
    Posted 4 years ago #

    775 didn't work, 777 did. I decided to manually 'open' the folder each time I am going to upload for now. I think I need more time to look into the user/group definitions for this folder. I use my FTP client on my mac to change the Info settings of the folder. If anyone have directions for me, please let me know.

    Maris

  9. Samuel B
    moderator
    Posted 4 years ago #

    WTF... stop telling people to set permissions to 777 !!!!

    Get a grip - no one is saying leave them that way - just put chmod 777 for /wp-content and uploads folders under it to 777 - do an upload - now chmod back to 755 - this is not a security hole.

  10. rribeiro
    Member
    Posted 4 years ago #

    The ONLY thing that worked was doing what SanchoPancho said and renaming the old uploads folder, creating a new uploads folder and setting both wp-content and uploads to 777.

  11. samrules
    Member
    Posted 4 years ago #

    HI, I have a problem with uploader, It was working fine yesterday.
    But today when I upload a image is gives following error

    The uploaded file could not be moved to D:\Hosting\5773820\html/wp-content/uploads.

    As far as I know it is because of wrong slashes for directories. But I havent changed anything , in misc option I have tried default settings, changed folder name to wp-content/uploads but it is not working.

    any suggestion what I can do,

    Thanks in advance

  12. webbrian
    Member
    Posted 4 years ago #

    My solution was to delete my folder wp-content/uploads and create a new folder with that same name. For some reason the folder was there but the permissions couldn't be changed. I wrote about that and a few other permission issues on my blog setting up wordpress

Topic Closed

This topic has been closed to new replies.

About this Topic