0

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?

pnuts
  • 58,317
  • 11
  • 87
  • 139
user1220022
  • 11,167
  • 19
  • 41
  • 57
  • what are the permissions on /var/www (755 is what I would expect; if it's 750, that could be the problem although I suspect not). Also, as a workaround, if you make a test directory (owned by test:test) and put b in there, does that work? – Foon Jul 08 '15 at 14:05
  • They are `755`, I also tried making a directory `test` already with the owner `test` and inside a file owned by `test`, but I get the same error. – user1220022 Jul 08 '15 at 14:21

0 Answers0