• Hello.

    When I upload an image using WordPress’ admin or a 3rd party blog editor such as MarsEdit, new folders and files are created as the apache user and apache group.

    How can I change this as this is breaking my upload functionality. I have to manually go in and change my user/group on the folder that WordPress created and then (and only then) I can upload an image to that directory.

    So for instance if I upload a new image on September 1st, 2007. WordPress will create this folder for September,

    /wp-content/uploads/2007/09/

    with ownership to apache/apache.

    Then it tries to upload my image to that directory and it can’t, because that ownership needs to be MY username and the plesk group psacln. Once I manually make those ownership adjustments things work fine.

    Any way to solve this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • self-hosted?

    fix your set up.

    if not, thats a host issue.

    you can chown the files in php if you are so inclined. edit the code that does the upload.

    Thread Starter jcontonio

    (@jcontonio)

    I am self-hosted but not quite sure how to go about doing that with a plesk setup. Any pointers?

    When I create a new file through my FTP program, it gives the correct ownership…it’s just through WordPress’s xmlrpc thing that makes the owner and group “apache”

    why would you use plesk to make changes to your web server or your file system?

    You dont understand file systems well if you dont realize why you get one behaviour via ftp and another using WP’s xml-rpc set up…

    Im not saying to be crass or rude, honestly.

    When you ftp into a site using login credentials, files and directories created are created using those credentials.

    Files and directories created by Apache or PHP, in your case, are going to be assigned the ownership based on what is creating the files or directories — in this case it’s Apache/Apache

    Thats the user/group combo that Apache is running as.

    I am not going to walk you through how to set up a server, change these settings etc..

    1. Because you havent indicated what OS you are running.
    2. Even IF I knew what OS, I dont know how you Apache set up, etc.. filesystem set up, etc..
    3. There are other forums that handle these types of questions – while you might find this to be WordPress related, its NOT within the scope of these forum — at least not for me to answer, it isnt. Its actually a “how do I set up my box” question.

    If youre running Linux, Google can provide you with thousands of sites that cover how to do this, for instance, try googling for umask

    if you are using windows, the same applies, Ive just no idea what the equivalent of umask would be, if there even is one for windows.

    Thread Starter jcontonio

    (@jcontonio)

    I’m not using plesk to make changes, I just know that plesk likes things “its way” and wasnt sure if I made a change if it would screw it up.

    Thanks for the detailed post…A tip like “umask” was exactly what I wanted to know.

    And no I’m not a *nix expert, I’m a web developer with a dedicated plesk box. Thought it could be a WordPress issue since it’s the xmlrpc that is creating the file. Doesn’t seem a ridiculous place to post a question about it.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New files created as apache user, I need to change this’ is closed to new replies.