SMB2's Tree Connect Request is not sent from Windows 10

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SMB2's Tree Connect Request is not sent from Windows 10

Postby johiroshi » 15. August 2016 02:43

When Apache on Windows 10 starts from service, shared files supported by SMB2 can't be read.
If using Windows 7, all files can be read. And if Apache starts from XAMPP Control Panel (not from service), files can be read.
Is this XAMPP/Apache Bugs ?

*** My Environment ***
Windows 10 Pro, ver. 1607, OS build 14393.51
Apache 2.4.17
PHP 5.6.23
Target Shared Device: QNAP NAS, TS231
***

Code: Select all
<?php

$file_path = "\\\\TS231-1\\fs_data\\data.xml";

var_dump(file_get_contents($file_path));

?>


*** Error Message ***
Warning: file_get_contents(\TS231-1\fs_data\data.xml): failed to open stream: Invalid argument in C:\xampp\htdocs\index.php on line 16
bool(false)
***

*** WireShark ***
Image
***
johiroshi
 
Posts: 2
Joined: 15. August 2016 02:24
XAMPP version: 5.6.23
Operating System: Windows7, Windows10

Re: SMB2's Tree Connect Request is not sent from Windows 10

Postby Nobbie » 15. August 2016 10:02

johiroshi wrote:Is this XAMPP/Apache Bugs ?


No. It is your missing Windows skills. A program which is started "directly" by a User, is run with this Users priviliges. If you start the same program as a service, that program is NOT run by your UserId, but i.e. from the "SYSTEM" User. The SYSTEM User runs with different priviliges and different environment than your own UserID.

That is plain and pure Windows Knowledge.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: SMB2's Tree Connect Request is not sent from Windows 10

Postby johiroshi » 16. August 2016 00:53

Nobbie wrote:A program which is started "directly" by a User, is run with this Users priviliges. If you start the same program as a service, that program is NOT run by your UserId, but i.e. from the "SYSTEM" User. The SYSTEM User runs with different priviliges and different environment than your own UserID.


Thanks, Nobbie.

I know what you say. Do you mean the privilege of "SYSTEM" user changes from Windows 7 to Windows 10 ?
On Windows 7, No difference is found when program is started as service or not as service. I can read shared file with no problem.
However, on Windows 10, as said before, I can not read shared file if program starts as service.

Is this new specifications of Windows ? or my missed skill of Apache ?
johiroshi
 
Posts: 2
Joined: 15. August 2016 02:24
XAMPP version: 5.6.23
Operating System: Windows7, Windows10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 60 guests