• Resolved Tony Stark

    (@tony-stark)


    Hi,

    I have read several posts which seem to relate the issue I am having but on a brand new install (which is working as far as viewing and admin is concerned) I cannot upload files to the media library? This is on a VPS (Debian) box. I try to upload files and I get the following error:

    The uploaded file could not be moved to /var/www/vhosts/myblogdomain/httpdocs/wp-content

    None of the posts seem to have a concrete answer? Anyone know what is causing this and more importantly, what can be done to fix it?!

    Thanks

    Tony

Viewing 11 replies - 31 through 41 (of 41 total)
  • 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.

    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

    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.

    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!

    @typecastfilmsThanks! – 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.
    @johanlword. People! – opening your uploads dir to the world via chmod 777 is a wee bit insecure (IMHO).

    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

    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

    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.

    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.

    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

    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

Viewing 11 replies - 31 through 41 (of 41 total)
  • The topic ‘Media Upload Problem (The uploaded file could not be moved to error)’ is closed to new replies.