proper permissions under HTTP root with Apache2 + FastCGI + Suexec
2
votes
0
answers
851
views
I currently have a setup which runs Apache2 + FastCGI PHP + Suexec.
As an example, I'm using
/mnt/data/www/vhosts/inflex.co.uk/htdocs
as a DocRoot for one of my virtual hosts.
I have a script /mnt/data/www/php5-cgi/inflex.co.uk/php5-cgi
which contains:
#!/bin/sh
exec /usr/bin/php5-cgi
The account the scripts should run under is duncan
, this file is owned by duncan and also in the group duncan. It has -rwxr-x---
permissions.
.../www/vhosts/inflex.co.uk
and ../inflex.co.uk/htdocs
is owned by duncan and in the group duncan.
If I remove all access for others, such as chmod 750
, I get an error regarding permissions when trying to access the website, if I allow read/write for others, 755 say, it works.
I'm assuming this is an issue with www-data
(apache2 user) accessing the directory, but I thought the point of Suexec was that all of this was ran under a seperate user, or does www-data
require read (maybe write?) on the folder and then executes PHP php file as the user?
Asked by dunks
(21 rep)
Apr 9, 2012, 12:14 PM
Last activity: Jul 12, 2016, 12:00 PM
Last activity: Jul 12, 2016, 12:00 PM