Current time: 11-16-2024, 08:07 AM Hello There, Guest! (LoginRegister)


Post Reply 
Problems with php5-fcgi-starter and suexec
Author Message
smallFire Offline
Newbie
*

Posts: 6
Joined: Jun 2007
Reputation: 0
Post: #1
Question Problems with php5-fcgi-starter and suexec
I have some problems after an upgrade from rc2 to rc3 on Ubuntu Dapper:

My error-log:
Code:
[Sun Mar 09 18:51:20 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (uid 0, gid 0) restarted (pid 30733)
[Sun Mar 09 18:51:20 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (pid 30733) terminated by calling exit with status '107'

and my suexex.log
Code:
[2008-03-09 18:41:20]: uid: (root/root) gid: (0/0) cmd: php5-fcgi-starter
[2008-03-09 18:41:20]: cannot run as forbidden uid (0/php5-fcgi-starter)
[2008-03-09 18:51:20]: uid: (root/root) gid: (0/0) cmd: php5-fcgi-starter
[2008-03-09 18:51:20]: cannot run as forbidden uid (0/php5-fcgi-starter)

It look likes the wrong username is parsed to php5-fcgi-starter. Does anyone have any hints to solve this problem?
03-10-2008 03:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Problems with php5-fcgi-starter and suexec
have a look in
- /etc/apache2/mods-enabled/fastcgi_ispcp.conf
- the User/Group Settings in .../sites-enabled/00_master.conf
- the Owner of /var/www/fcgi/master

/J
03-10-2008 04:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
smallFire Offline
Newbie
*

Posts: 6
Joined: Jun 2007
Reputation: 0
Post: #3
RE: Problems with php5-fcgi-starter and suexec
/etc/apache2/mods-enabled/fastcgi_ispcp.conf
Code:
<IfModule mod_fastcgi.c>
        FastCgiWrapper On
        FastCgiIpcDir /var/lib/apache2/fastcgi2
        FastCgiConfig -minProcesses 1 -maxProcesses 10 -singleThreshold 100
                      #-killInterval 300 \
                      #-autoUpdate \
                      #-idle-timeout 240 \
                      #-pass-header HTTP_AUTHORIZATION

        FastCgiServer /var/www/fcgi/master/php5-fcgi-starter -user vu2000 -group v

        #
        # PHP5 SUPPORT
        #

        AddHandler php-fastcgi .php .php5

        <Location /php5/php5-fcgi-starter>
            SetHandler fastcgi-script
            Options +ExecCGI
        </Location>

        Action php-fastcgi /php5/php5-fcgi-starter
        AddType application/x-httpd-php .php .php5
</IfModule>

the User/Group Settings in .../sites-enabled/00_master.conf
Code:
#
# Master Begin
#

<VirtualHost 85.25.130.132:80>

    ServerAdmin     xxx@web.de
    DocumentRoot    /var/www/ispcp/gui

    ServerName      admin.alphaXXX.server4you.de

    ErrorLog        /var/log/apache2/users/admin.alphaXXX.server4you.de-error.log
    TransferLog     /var/log/apache2/users/admin.alphaXXX.server4you.de-access.log

    CustomLog       /var/log/apache2/admin.alphaXXX.server4you.de-traf.log traff
    CustomLog       /var/log/apache2/admin.alphaXXX.server4you.de-combined.log com

    Alias /errors   /var/www/ispcp/gui/errordocs/

    ErrorDocument 401 /errors/401.html
    ErrorDocument 403 /errors/403.html
    ErrorDocument 404 /errors/404.html
    ErrorDocument 500 /errors/500.html
    ErrorDocument 503 /errors/503.html

    Alias /pma      /var/www/ispcp/gui/tools/pma/
    Alias /webmail  /var/www/ispcp/gui/tools/webmail/
    Alias /ftp      /var/www/ispcp/gui/tools/filemanager/

    <IfModule suexec_module>
           SuexecUserGroup vu2000 vu2000
    </IfModule>

    <Directory /var/www/ispcp/gui>
        Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_fastcgi.c>
        ScriptAlias /php4/ /var/www/fcgi/master/
        ScriptAlias /php5/ /var/www/fcgi/master/
        <Directory "/var/www/fcgi/master">
            AllowOverride None
            Options +ExecCGI MultiViews -Indexes
            Order allow,deny
            Allow from all
        </Directory>
    </IfModule>

    <IfModule mod_php4.c>
        <Directory /var/www/ispcp/gui>
            php_admin_value open_basedir "/var/www/ispcp/gui/:/etc/ispcp/:/proc/:/
            php_admin_value session.save_path "/var/www/ispcp/gui/phptmp/"
        </Directory>
    </IfModule>
    <IfModule mod_php5.c>
   <Directory /var/www/ispcp/gui>
            php_admin_value open_basedir "/var/www/ispcp/gui/:/etc/ispcp/:/proc/:/
            php_admin_value session.save_path "/var/www/ispcp/gui/phptmp/"
        </Directory>
    </IfModule>

</VirtualHost>

#
# Master End
#

the Owner of /var/www/fcgi/master
Code:
drwxr-xr-x 2 root   root   4096 2007-05-01 22:52 php4
-rwxr-xr-x 1 vu2000 vu2000  196 2008-03-09 16:28 php4-fcgi-starter
drwxr-xr-x 2 root   root   4096 2007-05-01 22:55 php5
-rwxr-xr-x 1 vu2000 vu2000  195 2008-03-09 18:43 php5-fcgi-starter

Looks all fine for me...
03-10-2008 04:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: Problems with php5-fcgi-starter and suexec
Hi

the one line is cut I assume... "FastCgiServer...."

is suexec_module loaded?
try to comment the 2 lines:
<IfModule suexec_module>
and
</IfModule>
so the SuexecUserGroup is set (try to set) in all situations...

I also recommend the newer fastcgi_ispcp.conf - since RC3
http://www.isp-control.net/ispcp/browser...tcgi2.conf
but this should not be the problem.
03-10-2008 04:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
smallFire Offline
Newbie
*

Posts: 6
Joined: Jun 2007
Reputation: 0
Post: #5
RE: Problems with php5-fcgi-starter and suexec
Hi, I changed it to:
Quote:#<IfModule mod_fastcgi.c>
FastCgiWrapper On
FastCgiIpcDir /var/lib/apache2/fastcgi2
FastCgiConfig -minProcesses 1 -maxProcesses 400 \
-multiThreshold 80 -maxClassProcesses 5 -killInterval 60 \
-startDelay 5 \
-idle-timeout 300
#-pass-header HTTP_AUTHORIZATION

FastCgiServer /var/www/fcgi/master/php5-fcgi-starter -user vu2000 -group vu2000

#
# PHP5 SUPPORT
#

AddHandler php-fastcgi .php .php5

<Location /php5/php5-fcgi-starter>
SetHandler fastcgi-script
Options +ExecCGI
</Location>

Action php-fastcgi /php5/php5-fcgi-starter
AddType application/x-httpd-php .php .php5
#</IfModule>

and the result:

Code:
[Sun Mar 09 23:42:32 2008] [warn] FastCGI: server "/var/www/fcgi/master/php5-fcgi-starter" (uid 2000, gid 2000) started (pid 24555)
[Sun Mar 09 23:42:32 2008] [notice] Apache configured -- resuming normal operations
[Sun Mar 09 23:43:29 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (uid 0, gid 0) started (pid 24680)
[Sun Mar 09 23:43:29 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (pid 24680) terminated by calling exit with status '107'
[Sun Mar 09 23:43:34 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (uid 0, gid 0) restarted (pid 24685)
[Sun Mar 09 23:43:34 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (pid 24685) terminated by calling exit with status '107'
[Sun Mar 09 23:43:39 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (uid 0, gid 0) restarted (pid 24686)
[Sun Mar 09 23:43:39 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (pid 24686) terminated by calling exit with status '107'
[Sun Mar 09 23:43:44 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (uid 0, gid 0) restarted (pid 24689)
[Sun Mar 09 23:43:44 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" (pid 24689) terminated by calling exit with status '107'
[Sun Mar 09 23:43:44 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
[Sun Mar 09 23:43:45 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/master/php5-fcgi-starter" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
03-10-2008 08:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #6
RE: Problems with php5-fcgi-starter and suexec
You see?

the first server is started correctly - the next not (uid:gid 0:0).

so, I think you need some corrctions in your apache config

apache2 -M
apache2 -S

and check the

<IfModule suexec_module>
SuexecUserGroup vu2000 vu2000
</IfModule>

/J
03-10-2008 09:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
smallFire Offline
Newbie
*

Posts: 6
Joined: Jun 2007
Reputation: 0
Post: #7
RE: Problems with php5-fcgi-starter and suexec
Code:
<IfModule suexec_module>
SuexecUserGroup vu2000 vu2000
</IfModule>
[x] checked

What do you mean with
Quote:so, I think you need some corrctions in your apache config

apache2 -M
apache2 -S
apache2 -S is not finding any errors.
03-10-2008 10:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #8
RE: Problems with php5-fcgi-starter and suexec
you have to make sure, that the user:groups are set correct for your vhosts.

but you know it better - right?
(This post was last modified: 03-10-2008 10:38 AM by joximu.)
03-10-2008 10:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
smallFire Offline
Newbie
*

Posts: 6
Joined: Jun 2007
Reputation: 0
Post: #9
RE: Problems with php5-fcgi-starter and suexec
Well, I'll resigned. Luckily I've backuped all my config files and now the system is up and running (with RC2...) - Maybe next weekend I'll try it again. Thanks for you help!
03-10-2008 11:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)