Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

From: Date: Wed, 24 Mar 2010 23:00:09 +0000
Subject: Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148966@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:               27051
 Updated by:       pajoye@php.net
 Reported by:      ghoffer at globalscape dot com
 Summary:          Impersonation with FastCGI does not EXEC process as
                   impersonated user
 Status:           Feedback
 Type:             Bug
 Package:          CGI related
 Operating System: Windows
 PHP Version:      5.3
 Assigned To:      pajoye

 New Comment:

It is not the same context using runas or impersonate.

Did you use "c:\\....\\whoami" or "cmd /c..."?


Previous Comments:
------------------------------------------------------------------------
[2010-03-24 23:58:27] heer2351 at zonnet dot nl

Result:
PHP Warning: exec(): Unable to fork [c:\Windows\System32\whoami] in
D:\Web\Public\Typo3\v4_2_6\fdha_hr\hr\forkTest.php on line 2

------------------------------------------------------------------------
[2010-03-24 23:56:20] heer2351 at zonnet dot nl

BTW if I run the same script on the webserver using fakeCGI and runas to
run as the application pool user it works.

Fake FastCGI web server
FCGI_PARAMS sent
FCGI_STDIN sent
Launching receive loop
FCGI_STDOUT: X-Powered-By: PHP/5.3.2
Content-type: text/html; charset=utf-8

Hello World!"

FCGI_END_REQUEST received
killing app
FastCGI process exited with 0

So the problem is definitely in the combination IIS6 and PHP 5.3

------------------------------------------------------------------------
[2010-03-24 23:53:10] pajoye@php.net

Can you try using: c:\Windows\System32\whoami please?

------------------------------------------------------------------------
[2010-03-24 23:50:21] heer2351 at zonnet dot nl

I am using a simple test script to do the test:
<?php
echo exec('cmd /c echo Hello World!');
?> 

FastCGI impersonation:
In PHP.ini
fastcgi.impersonate = 1

IIS:
Anonymous Authentication = On 
User is same user as Application Pool user

User has been added to IIS_WPG

------------------------------------------------------------------------
[2010-03-24 23:40:45] pajoye@php.net

And how exactly did you configure FCGI (impersonation). As your
configuration is exactly one of my tests configuration, and it works
just fine.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Thread (50 messages)

« previous php.bugs (#148966) next »