Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

OS: Ubuntu 10.04 etc/suphp/suphp.conf:

    ;Path to logfile


    ;User Apache is running as

    ;Path all scripts have to be in

    ;Path to chroot() to before executing script

    ; Security options

    ;Check wheter script is within DOCUMENT_ROOT

    ;Send minor error messages to browser

    ;PATH environment variable

    ;Umask to set, specify in octal notation

; Minimum UID

; Minimum GID

;Handler for php-scripts

;Handler for CGI-scripts

some vhost in sites-enabled:

NameVirtualHost *:8080

<VirtualHost *:8080>
ServerAdmin ...
ServerName ...
ServerAlias ...
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
suPHP_Engine on
suPHP_UserGroup user  user
suPHP_ConfigPath "/home/user/etc"
suPHP_PHPPath /usr/bin
DocumentRoot /home/user/web/
ErrorLog /var/log/apache2/
CustomLog /var/log/apache2/ common
<Directory /home/user/web/>
Order Deny,Allow
Allow from all
Options +Indexes

But when I did nano /home/user/web/id.php and paste


in it, result I get is:

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Have no idea what to do so I was hoping comunity could help


share|improve this question
What is the owner and group of the id.php file and what did you expect to happen ? – Iain Dec 12 '10 at 20:04
It looks something like this: -rw-r--r-- 1 haruns haruns 23 2010-12-12 19:25 id.php So I was expecting to have user running php files not www-data which is apache – amarc Dec 12 '10 at 20:18

The only thing that leaps out at me is that the documentation says the suPHP_UserGroup user user statement is only valid inside <Directory> ... </Directory>.

EDIT - I set this up and it's working - this is what I did

I created /etc/apache2/mods-available/suphp.conf containing

<IfModule mod_suphp.c>
AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-suphp

and /etc/apache2/mods-available/suphp.load containing

LoadModule suphp_module /usr/lib/apache2/modules/

I ran

sudo a2enmod suphp
sudo a2dismod php5

to enable suphp and disable php

my vhost in sites-enabled

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        suPHP_Engine on
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
                suPHP_UserGroup user user
        . other stuff

/var/www is owned by user:user My /etc/suphp/suphp.conf is functoinally the same as your's. OS is Ubuntu 10.04

share|improve this answer
No.. still same. Changed that as you said but no luck.. – amarc Dec 13 '10 at 20:35
@amarc: Your AddType and AddHandler are incorrect. – Iain Dec 14 '10 at 8:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.