Permission problems on newly created folders

Discussion in 'Installation/Configuration' started by becks87, Sep 25, 2014.

  1. becks87

    becks87 New Member

    Hi Everyone!

    I have an old problem on my ISPConfig2 installation what i can't resolve finally. When I create a folder from the browser it is created with 755 permissions and www-data:www-data ownership. Then I want to create, upload a file/folder in it and I can't due to permission errors. I'm not sure why it can't, because of www-data user have the rwx rights.
    I have a script to do a chown and chmod recursively on these folders running in every 2 minutes. It sets the folder owner to (sitesftpuser):www-data with 775 permissions. After that, Apache can create another folder/file in it, again with www-data:www-data and 755. Then the script corrects it in 2 minutes and so on.
    This works for years correctly, I fixed a few directory's problems for a while.

    Now i have a customer who has a webpage, which wants to create more than one directory in a structure in the same time. The 2 minutes script can't work.

    I have two questions what I can't understand. If new dirs have www-data:www-data with 755 why www-data user can't write to it? If this is an Apache restriction how can I disable it?
    Next, I have suexec installed. I have read that if I'd like to run PHP scripts with another user's rights I can use that. Can I do some hack with my ISPConfig2's Apache directives? Or does anybody have a solution for that?
    I want a solution with the least changes on the server, if possible a site-based solution to make sure the other customers have no problems on their sites.
     

Share This Page