Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as off-topic by Jeff Schaller, dhag, sam, slm Jul 12 at 18:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, dhag, sam, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Ok, had another look with a fresh pair of eyes, turns out you need to have o+x so that the directories can be tranversed by others. – dunks Apr 9 '12 at 12:21
    
But it seems that files still need to be readable by others (or www-data) – dunks Apr 9 '12 at 12:25