suphp run files as different owner from same directory

196 Views Asked by At

I'm trying to use suphp to run php scripts as different users from within the same directory.

For example, I have /var/www/ as the webroot which is owned by www-data and inside I have 2 files with different ownsers:

a.php (chmod 640, chown www-data:www-data)
b.php (chmod 640, chown test:test)

When I access a.php I have no problems, but when I access b.php I get a 500 error and the /var/log/apache2/error.log error of:

SoftException in Application.cpp:557: Directory /var/www is not owned by test
End of script output before headers: b.php

I've used this paradigm before with suphp which makes me think it's a new feature.

Can someone comment on how I can accomplish running php files with different owners from the same directory?

0

There are 0 best solutions below