WordPress.org

Ready to get started?Download WordPress

Forums

Upload images in WP2 problem (29 posts)

  1. zople
    Member
    Posted 8 years ago #

    I have upgraded to 2.0, but now cannot uplod any pictures

    'Unable to create directory /home/kdixon/public_html/myword/wp-content/uploads. Is its parent directory writable by the server?'

    I receive the above error message, I have changed permissions on all I can find. Help!!

  2. MichaelH
    Member
    Posted 8 years ago #

    Try changing wp-content permissions to 777. The system is trying to create wp-content/uploads and then, wp-content/uploads/2006 and then wp-content/uploads/2006/01 folders.

  3. Arnan de Gans
    Member
    Posted 8 years ago #

    rather create a folder named uploads in the wp-content folder and give THAT one 0777, wp-content should have some protection dont you think?

  4. ktula
    Member
    Posted 8 years ago #

    What you can do is change the ownership of the "uploads" directory so that it is owned by the web server process. My apache web server processes are owned by the "web" user so i just changed the ownership to the "uploads" directory to be "web".

  5. sandi
    Member
    Posted 8 years ago #

    I have the same problem as zople, but no clue how to change either the ownership or the permission of the uploads-folder in my ftp-client. or where do I do it? (I work with Mac OS X, not Windows)

    and what do you do if the permission-ownership-thing does not work?

    any ideas? thanks!

  6. dudez12
    Member
    Posted 8 years ago #

    chmod wp-content to 777, then after the uploads folder is created chmod it back to wherever it was before.

  7. agrei8
    Member
    Posted 8 years ago #

    I go the same initial message at the start of the thread however after CHMOD the WP-Content folder to 777 I now get the following message "The uploaded file could not be moved to " That's all! I am not sure how to change the ownershipover to the webuser as mentioned by Ktula "What you can do is change the ownership of the "uploads" directory so that it is owned by the web server process. My apache web server processes are owned by the "web" user so i just changed the ownership to the "uploads" directory to be "web". "

    Any otherideas???

  8. sandi
    Member
    Posted 8 years ago #

    I changed the ownership of the uploads-directory to 777 but it still does not work. I get the same error:

    Unable to create directory .../blog/wordpress/wp-content/uploads. Is its parent directory writable by the server?

    Any other ideas? Thanks a lot!

  9. twotwentysix
    Member
    Posted 8 years ago #

    I am having a similar problem.
    Unable to create directory html/core/wp-content/uploads/2006. Is html/core/wp-content/uploads writable?

    but my html folder is 777, my core folder is 777 the uploads folder I created it myself and made it 777, now I cant even delete it anymore.

    is it possible to ftp your own images to the uploads folder, so that I can use them with the browse images feature?
    is it also possible to change the upload folder to something else or does it have to be wp-content/uploads

    thanks

  10. MichaelH
    Member
    Posted 8 years ago #

    twotwentysix:

    In this case you should try making the wp-content folder permissions be 777.

    There doesn't seem a way to ftp a file and browse to it. You'd just have to put a link to that file in your post.

    The default upload path can be changed by adding a line of code to your wp-config.php file.

    Just BEFORE the line that says require_once(ABSPATH.'wp-settings.php');
    add this line:
    define('UPLOADS', 'wp-content/myimages');

    In the example above, this will result in uploads being placed in your wp-content/myimages/2006/01 folder. Note that 2006 is the current year, and 01 is the current month, in this case January.

    If the myimages directory does not exist it will be created as long as the parent folder wp-content is writeable. An unwriteable parent folder will cause a message similar to this:
    "Unable to create directory /sample.com/wordpress/wp-content/myimages. Is its parent directory writable by the server?"

    A plugin alternative to enable uploading like WordPress 1.5.2 is available with Filosofo's Old-style-uploads: http://www.ilfilosofo.com/blog/old-style-upload

    See also, Changing File Permissions and a related Forum Thread http://wordpress.org/support/topic/55954

  11. twotwentysix
    Member
    Posted 8 years ago #

    I forgot to write, the wp-content folder was also 777, so that isn't the problem either.
    and about changing the images folder, I meant that I'd rather have them reside in one folder than different date folders (ie. 2006/01/ etc.)
    sorry for not explaining that right.

    TIA

  12. boneless
    Member
    Posted 8 years ago #

    I changed my upload folder to root/files
    the 'files' has 777 (It already had, I used it with wordpress 1.5 already, without a problem).
    I still get the following error:

    Unable to create directory /home/virtual/site136/fst/var/www/html/files/2006/01. Is /home/virtual/site136/fst/var/www/html/files/2006 writable?

    Why does it have to make subdirs? Why did this part of wordpress had to be changed, before 2.0 uploading worked fine, now no one seems to be able to get it working.

  13. ktula
    Member
    Posted 8 years ago #

    boneless:
    I think WordPress is trying to organize your upload by Year/Month. When you said your "files" folder is already 777, how do you know so? In a UNIX-based system, if a directory (or folder) has a permission of 777, that means everyone on the system is able to make changes in that particular folder. So i am not really sure why WordPress is not able to create the sub-folders under "files".

    If you are only accessing the system via FTP, i do not think it is possible to change the ownership of the directory (folder). But if you can somehow access the system using either telnet or ssh, this is how you change ownership:

    chown webuser.webuser files

    This will change the ownership of the "files" directory to be owned by the "webuser" user, and the "webuser"group.

    I am not familiar with any web servers running on windows system, but if your web server runs on a UNIX-based system, and your web server software is Apache, then it is possible to find the owner of the web server processes by doing this:

    ps -ef |grep httpd

    You might see this:
    # ps -ef|grep httpd
    root 1911 1 0 Jan18 ? 00:00:01 /usr/local/apache2/bin/httpd -k start -DSSL
    web 19049 1911 0 Jan23 ? 00:02:24 /usr/local/apache2/bin/httpd -k start -DSSL
    web 19059 1911 0 Jan23 ? 00:02:25 /usr/local/apache2/bin/httpd -k start -DSSL
    web 19062 1911 0 Jan23 ? 00:01:17 /usr/local/apache2/bin/httpd -k start -DSSL
    web 25455 1911 0 Jan23 ? 00:01:09 /usr/local/apache2/bin/httpd -k start -DSSL
    web 25480 1911 0 Jan23 ? 00:00:47 /usr/local/apache2/bin/httpd -k start -DSSL
    web 5337 1911 0 10:45 ? 00:00:16 /usr/local/apache2/bin/httpd -k start -DSSL
    web 5338 1911 0 10:45 ? 00:00:15 /usr/local/apache2/bin/httpd -k start -DSSL
    web 5339 1911 0 10:45 ? 00:00:15 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6797 1911 0 12:41 ? 00:00:18 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6798 1911 0 12:41 ? 00:00:11 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6818 1911 0 12:43 ? 00:00:10 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6819 1911 0 12:43 ? 00:00:11 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6832 1911 0 12:43 ? 00:00:12 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6839 1911 0 12:44 ? 00:00:10 /usr/local/apache2/bin/httpd -k start -DSSL
    web 6845 1911 0 12:44 ? 00:00:11 /usr/local/apache2/bin/httpd -k start -DSSL

    The first column is the owner of the httpd processes. You see the first process is owned by the "root" user and everything else is owned by the "web" user.

    The "chown" command might not work if you do not have root privileges.

  14. boneless
    Member
    Posted 8 years ago #

    I've checked and double checked and the files folder is 777. But, the 2006 folder, made by wordpress, dont allow users or group to write to it and somehow it can't be changed. So it seems wordpress is allowed to make the 2006 folder, but not the '01'folder. Weird thing is, even I ain't allowed to make that folder or to change the permissions of the 2006-folder.

    Still, this all isn't necessary if worpress just uploads all files I want to upload to the 'files'folder, as it used to do before upgrading. I don't want wordpress to create new folders for me, I want it to do as I want!

    Any idea on how to change the way WP handels the uploading?

  15. twotwentysix
    Member
    Posted 8 years ago #

    I am also interested in what boneless is aksing, because I have chmoded all the needed folders to 777 using telnet and IT STILL DOES NOT WORK.

    I just want to be able to use the insert image option but also be able to CHOOSE what folder I want the uploads to go.

    It sucks that wordpress generates those folders (2006/01 etc) I want to choose where my files come from and where they go to...

  16. boneless
    Member
    Posted 8 years ago #

    I've installed the following plugin and problem solved. It works just like before, choose your own upload directory and yes or no thumbnail. Im happy again!

    http://wp-plugins.net/plugin/filosofo-old-style-upload/

  17. twotwentysix
    Member
    Posted 8 years ago #

    I have that too, but I do want to be able to use the "insert image" option.

  18. Arnan de Gans
    Member
    Posted 8 years ago #

    try setting it at 0777 at *nix systems

  19. brianbonner
    Member
    Posted 8 years ago #

    I just want to get rid of the upload option, I use ftp for moving files and just link to them. That upload section takes up too much room for me. Why didn't they make that reduce like the rest of the options?

  20. sandi
    Member
    Posted 8 years ago #

    i got the old-style-plugin, and it works, but i had to set the wp-content-directory to permission 777.
    is it really a good idea to open all doors to everybody???

  21. Arnan de Gans
    Member
    Posted 8 years ago #

    its not, try setting the uploads folder to 0777 and not the contents folder

  22. mores
    Member
    Posted 8 years ago #

    same "problem" here.

    wp tried to create a 2006 folder, but it wasnt writable.
    using cuteFTP, i saw that the folder 2006 was created, but not writeably. so when i tried to do it by hand, i wasn't allowed to change any thing, since obviously i wasn't the author.
    so i deleted 2006, created it myself, set 777, then created the subfolders 01 up to 12, set each as writeable (what a pain to do manually!!), now it works.

    but that's not really something i should have to do every year!
    dang!

  23. sandi
    Member
    Posted 8 years ago #

    when the content folder does not have 777, i cannot do any administration, no change in the blog, no activating of plugins, nothing.
    and i really don't feel good having a single folder on my server which is open to everybody.

    there has to be another way!

    does anybody know where to get the old wordpress?

    thanks!

  24. Mosonny
    Member
    Posted 8 years ago #

    Unable to create directory /home/unhinged/public_html/wp-content/uploads/2006/06. Is its parent directory writable by the server?

    I am getting this also, am new to the whole WP thing, can't figure out where to even start. Can anyone walk me through how to make this work (if it's doable...seems to be a common problem?)

    Thanks.

  25. Snapgrid
    Member
    Posted 7 years ago #

    I chmod'ed wp-content to 777. I tried image upload and the "uploads" folder was created by wordpress. However, for some reason the "07" folder for July could not be created by WordPress. I checked and the "uploads" folder was created by wordpress with 777 permissions, so why can't wordpress now created sub items?

  26. yosemite
    Member
    Posted 7 years ago #

    Check the parent, in this case: /2006/

  27. Squonk
    Member
    Posted 7 years ago #

    I had the same problem with WP 2.0 not being able to create a folder beyond 2006 even though everything's been set to 777.

    The only way I could get it to work was to uncheck the "organize my uploads into year and month" and fill in the exact directory "wp-content/uploads" for uploading.

    It works now. Funny though, never had that problem with other hosting companies till this new one.

  28. andrabr
    Member
    Posted 7 years ago #

    Partial solution:

    the problem is caused by your PHP running in SAFE mode.

    You need to fix this in /etc/php.ini (or wherever php.ini is on your server) or get the sysadmin to fix it.

    But WAIT! it is not necessarily over yet!

    In you Apache configuration files (there are often several) there may be a line:
    php_admin_flag safe_mode on

    Change it to OFF or comment it out.

    Make sure you understand the consequences - switching to OFF for a wrong directory may lead to all kinds of unpleasentness. Good luck!

  29. Torttis
    Member
    Posted 7 years ago #

    I had this problem too. My version is 2.0.4.

    Finally I used FTP, deleted the uploads folder in wp-content, created a new folder with the same name and gave that folder 777 permissions.

    It works now but what about the security?

Topic Closed

This topic has been closed to new replies.

About this Topic