Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapped drive permissions for two servers and web application

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

Hope this is the right place for this question, so here goes...


We have two servers, one in house SBS2003 Premium, the other is standard Win2K3 dedicated hosted web server.

We have a VPN tunnel between the two, all works fine.

I have been tasked with writing a web application (using perl), which needs access to files residing on our SBS2003 server.

So I have mapped the drive from the web server to our SBS server, works fine and I can see the files I need.

However, when I try to access the files from the perl web application it cannot find the files.

I'm assuming it's a permissions problem, but I don't know how to resolve it.

I have set the network share on the 'owner' server (SBS2003) to have an 'Everyone' permission with read/execute rights, but still the perl application fails to access the files.

It's worth noting that the web server is a stand alone server so not part of the domain.

How do I map the drive from our domain server to web server and give permission of read access to the perl application?

Thanks,
1DMF.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
I managed to create a workround, or perhaps it's just how it's meant to be done....

Firstly I had to split my CGI application, so the main app remained in the folder that uses 'Windows Authentication' , so the normal user login all worked as before.

Then the function that mapped the drive and retrieved the required file was taken out the main application script and put into its own CGI script as a standalone function.

I then created a sub folder from the main app and put the 'get file' script in that. Then in IIS I set that folder to use 'Basic Authentication'

I created a special login on the domain SBS server that only has access to the desired network share and now that is used when the document is first retrieved.

I also use perl to create the mapped drive like so
Code:
    # Map Membership Drive
    use Win32::OLE;
    my $objnet=Win32::OLE->CreateObject("Wscript.Network");
    $objnet->MapNetworkDrive("G:","\\\\192.168.0.50\\Membership",1,"USERID","PASSWORD");

It all seems to work as desired, but was a headache working it all out!



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top