Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > inetserver iis > november 2005 >

inetserver iis : Access a file in a shared folder (IIS 5)


Alan
11/30/2005 1:51:09 AM
I'm running PHP5 under IIS 5 and trying to access a file in a shared
(hidden) folder and failing.
I've asked on comp.lang.php about this and someone suggested that I may
get more help out of this ng.

<?php
$filename=
'//print-admin/Public$/planningprepress/planning/prepresslist.xls'
if (file_exists($filename)) {
echo 'File exists';
} else {
echo 'File does NOT exist';
}
?>

always gives 'File does NOT exist'.

World Wide Web Publising Service is running as LocalSystem at the
moment and I guess that this is the problem as we're in a domain using
active-directory.

In a moment of pure frustration I tried running IIS as (domain login)
Administrator, which actually launched the service but wouldn't serve
up any web pages.

How can I get this to work in IIS 5?

Alan
David Wang [Msft]
11/30/2005 9:29:25 PM
Read this URL on how to configure UNC shares for access by IIS:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/remstorg.mspx

Basically, the issue is a simple matter of "what is the user identity used
to access the shared folder".

You either configure IIS to use a specific user for all resource access to
the shared folder, or you use Pass-thru authentication to allow different
user identities to access the shared folder.

The user that is allowed to access the shared folder further depends on the
authentication protocol used between client/server because this privilege is
controlled via a concept called "delegation".

The whole thing is pretty straight forward and obvious once you understand
the security implications that each configuration entails. But until you
understand it, it looks like random configuration just to make things
"work".

Whether the machines are in a domain or standalone is irrelevant to the core
issue. Domain membership actually allows "delegation" so opens up more,
secure options.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
[quoted text, click to view]
I'm running PHP5 under IIS 5 and trying to access a file in a shared
(hidden) folder and failing.
I've asked on comp.lang.php about this and someone suggested that I may
get more help out of this ng.

<?php
$filename=
'//print-admin/Public$/planningprepress/planning/prepresslist.xls'
if (file_exists($filename)) {
echo 'File exists';
} else {
echo 'File does NOT exist';
}
?>

always gives 'File does NOT exist'.

World Wide Web Publising Service is running as LocalSystem at the
moment and I guess that this is the problem as we're in a domain using
active-directory.

In a moment of pure frustration I tried running IIS as (domain login)
Administrator, which actually launched the service but wouldn't serve
up any web pages.

How can I get this to work in IIS 5?

Alan

Alan
12/1/2005 2:49:43 AM
Thanks,
I was digging around with the logon user in the services and got locked
into this red-herring. Eventually I found the settings for the
anonymous access user, created a simple network logon with only access
to the share required and set the anonymous user to that login and now
it all works :-)

Alan
AddThis Social Bookmark Button