WordPress.org

Ready to get started?Download WordPress

Forums

file uploads/folder permissions question (8 posts)

  1. photocurio
    Member
    Posted 4 years ago #

    I've read the sticky and various posts on this but haven't seen an answer.

    I am able to upload images to my upload folder, but I can't upload to year-and-date subfolders. when I tried to upload to the subfolders, wordpress created a "2010" folder, but then was denied permission to make a month folder. whats up with that? WordPress created the year folder, but does not have write access to it?

    the permissions of my "uploads" and "2010" folders are both 777.

    the user and group for "2010" is apache and apache.

    user and group of "uploads" is [username] and psacln.

  2. Samuel B
    moderator
    Posted 4 years ago #

    user and group of "uploads" is [username] and psacln

    that is the problem with some server configs - when you do an upload from within wordpress it changes the owner of the folder
    ask your host to reset the folders

  3. photocurio
    Member
    Posted 4 years ago #

    I thought as much. but what folder(s) do I ask them to reset? uploads? what should it be set to?

    I thought 777 is the most permissive, so why would that be an issue?

  4. jimisaacs
    Member
    Posted 4 years ago #

    I thought 777 is the most permissive, so why would that be an issue?

    This unfortunately is becoming more subjective compared to what and how your host is running their platform. In a perfect world yes, but with other security features out there such as selinux, php_safe_mode, and open_basedir a lot of things can effect what you can or can't do on the file system.

    psacln is the user of the system Plesk, which can also mess with a platform if a host has been reluctant to update Plesk, but continue to update the system.

    I myself have a server running Plesk 7.0, a version that is about 5 years old now.

    Anyway, the directory in question is "uploads", and it is a mystery why PHP would be able to create a directory within a directory using psacln and not within a directory using the apache user/group.

    To me it sounds like PHP is being run under the psacln user, and if this is the case, it may be worth asking your host to add the apache user to the psacln group, or the psacln user to the apache group.

    Safe mode might have something to do with this, but if you aren't seeing any errors I can't say for sure.

  5. photocurio
    Member
    Posted 4 years ago #

    this is the error I get from the wordpress uploader:

    Unable to create directory /var/www/vhosts/templeparlor.com/httpdocs/wordpress/wp-content/uploads/2010/04. Is its parent directory writable by the server?

  6. johngalt80
    Member
    Posted 3 years ago #

    If anyone else is running on Plesk and having the image uploads problem (and CHMODing to 777 is not helping or anything else), the following will probably help you... it solved it for me.

    In WP admin, go to Settings/Media page and make sure the text box after "Store uploads in this folder" is blank... that causes WP to use the default path, which is "wp-content/uploads". If you know that your upload path is different than the default, then put it there, but the usual is to leave it blank.

    Now, do the following in your Plesk File Manager:
    Rename your "uploads" folder to something else, like "uploads_old". Then create a new folder and name it "uploads".

    Now, go into your WP admin and try uploading an image. It should work. If not, temporarily chmod your new "uploads" folder to 777, then upload. After you get it working, you can chmod it back to 755. (I'm not sure why this worked for me, but it did. It may have just been a lag in the server resetting after creating the new folder and I really didn't have to chmod to 777).

    Now you can upload any other folders and files to your new "upload" folder, but be careful not to overwrite and new folders/files that you just created.

    Hope this helps you Plesk users out there or anyone else using a similar system.

  7. DDT
    Member
    Posted 3 years ago #

    hi johngalt80,

    I followed your instruction but i still have the folder uploads created with apache as user and apache as group.

    How can i force WP to create the uploads and other folders within as user my-chosen-name group psacln??

  8. DDT
    Member
    Posted 3 years ago #

    ok when turning safe mode off it seems to work but hmmmmmm

Topic Closed

This topic has been closed to new replies.

About this Topic