ID: 46378
User updated by: tomas dot hlavacek at telekomaustria dot cz
Reported By: tomas dot hlavacek at telekomaustria dot cz
-Status: Open
+Status: Closed
Bug Type: *Configuration Issues
Operating System: Windows Server 2008
PHP Version: 5.2.6
New Comment:
Finally, I found the problem.
Listing on E: must be allowed for IIS_IUSRS:
E:\>icacls e:
e: NT AUTHORITY\SYSTEM:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
BUILTIN\IIS_IUSRS:(S,RD)
Previous Comments:
------------------------------------------------------------------------
[2008-10-24 12:20:01] tomas dot hlavacek at telekomaustria dot cz
Description:
------------
Hello,
in php.ini I have set upload_tmp_dir directive to "e:\php5-uploadtemp".
phpinfo() confirms, the directive is set to this value. But PHP is using
C:\Windows\Temp for uploading files instead. This is confirmed by
printing $_FILES['uploadedfile']['tmp_name'] in script.
Server configuration:
---------------------
Windows Server 2008
IIS 7
PHP 5.2.6 as FastCGI module with fastcgi.impersonate = 1
phpcgi.exe processes are running with "Network Service" privileges
(same as w3wp.exe) and are impersonating to IUSR_xxx accounts (each
customer has one). IUSR_xxx accounts are members of "IIS_IUSRS" group.
Rights on folders:
C:\>icacls c:\windows\temp
c:\windows\temp CREATOR OWNER:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
BUILTIN\Users:(CI)(S,WD,AD,X)
BUILTIN\IIS_IUSRS:(OI)(CI)(M)
C:\>icacls e:\php5-uploadtemp
e:\php5-uploadtemp BUILTIN\IIS_IUSRS:(OI)(CI)(M)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Under Windows Server 2003, IIS6, PHP5 as CGI, with same configuration
it was working.
The rights should be ok, because I have also set session.save_path =
e:\php5-sessiondata with same rights as on e:\php5-uploadtemp and this
is working correctly.
Reproduce code:
---------------
<?
...
print $_FILES['uploadedfile']['tmp_name'];
...
?>
Expected result:
----------------
e:\php5-uploadtemp\php214E.tmp
Actual result:
--------------
C:\Windows\Temp\php214E.tmp
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46378&edit=1