• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Wrong user group when file is created by apache

RattleSn@ke

New Pleskian
Hello there,

I'm having a sticky problem which involves many.
The problem is that when files are written by the webserver (through eg. PHP) the permissions are set to 600 and User/Group Apache.Apache
This results in broken pages and customers unable to remove or edit those files. (because user group are not set to the users group eg. psacln)

Does anyone have an idea how to force the user/group??

Thanks!
Onno.
 
Solution: suPHP. Search for it, there are a lot of posts on this. Too bad it's not a standard option in Plesk yet.

By the way, although scripts run by mod_php are running as apache you should be able to set permissions in your PHP script.
 
Well This is getting out of hand.

We run Plesk 8.1 and 8.1.1 on Centos 4.4

Now I have set up suPHP for 1 domain to test on.

Now the problem is, when you upload a file it has the correct user owner, but the permissiosn of 600 prevents the webserver now from serving this file, especially when its an image or non-php file getting uploaded.

Same happens when you run php as cgi or fast cgi with suexec

/sigh

Need a way to get proper umask set (umask setting in suphp.conf makes no difference).
 
Back
Top