IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 30th, 2012, 03:03 PM
112233 112233 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 37 112233 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 59 m 6 sec
Reputation Power: 5
IIS7 PHP access network file: access is denied error

Hello,

We just upgrade our webserver and we encountered some issue when using PHP system() to run a program in network drive.

Here are some information:
OLD server setting:
IIS6
PHP 5.3.1
WindowsXP

New Server:
IIS7
PHP 5.4
Windows Server 2008

Server and file structure:
2 servers:
Webserver: where the PHP files are located
Fileserver: is mapped as S drive in Webserver

In Webserver
c:/inetpub/wwwroot/vi/testrun.php: call the wotx.lnk
c:/inetpub/wwwroot/vi/wotx.lnk: a short cut to pvxwin32.exe in fileserver

Filesever:
Fileserver/MAS90/Home/pvxwin32.exe

test.php:
PHP Code:
<?php
system
('C:\Inetpub\wwwroot\vi\wotx.lnk 2>&1');
?>

wotx.lnk:
S:\MAS90\Home\pvxwin32.exe ..\LAUNCHER\SOTA.INI ..\SOA\STARTUP.M4P -ARG DIRECT UIOFF *** *** *** *** AUTO

The same code was working perfect in the old server.
But when we moved to the new server, I run test.php from browser, PHP system() gives me "access Denied" error.
But if I run the php file in command line in webserver, it works fine.
I think it might be permission issue.

Here are some configuration in webserver:
Default Application Pool --> Identity is set to Mydomain\web-server
web-server is a domain account, not a local account

Permission setting for wotx.lnk:
web-server@Mydomain.local full control

Permission setting for pvxwin32.exe in fileserver:
web-server@Mydomain.local full control

I have been working on this for several days and couldnot figure out how to fix it.
Any help will be highly appreciated. Thank you very much.

Last edited by 112233 : November 30th, 2012 at 03:16 PM.

Reply With Quote
  #2  
Old November 30th, 2012, 04:30 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,238 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 7 m 57 sec
Reputation Power: 4445
I see you've moved your question here as well as in the php forum. I doubt there are many IIS/php users around here but we can always hope. I haven't used IIS since IIS6 and haven't setup php in IIS for years, so I won't be any help, sorry.

I never knew you could even execute a shortcut from within IIS code, I don't think you can with classic asp anyway. I'd try to get rid of using a shortcut .lnk in your code for starters.

Hopefully someone with more knowledge of newer IIS and NET servers will spot this thread.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old November 30th, 2012, 04:42 PM
112233 112233 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 37 112233 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 59 m 6 sec
Reputation Power: 5
Quote:
Originally Posted by Doug G
I see you've moved your question here as well as in the php forum. I doubt there are many IIS/php users around here but we can always hope. I haven't used IIS since IIS6 and haven't setup php in IIS for years, so I won't be any help, sorry.

I never knew you could even execute a shortcut from within IIS code, I don't think you can with classic asp anyway. I'd try to get rid of using a shortcut .lnk in your code for starters.

Hopefully someone with more knowledge of newer IIS and NET servers will spot this thread.


Thank you very much for your reply.
The shortcut was working fine before. So I am assuming it is some setting in the new server.
I tried to remove the lnk and execute the exe file directly, but since it is in network drive, it kept giving me "cannot find the path" error.

Reply With Quote
  #4  
Old November 30th, 2012, 07:53 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,238 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 7 m 57 sec
Reputation Power: 4445
There have been a lot of changes between XP and W2008. First, XP isn't a server OS and may very well have some relaxed permissions in networking. Network access, firewalls, etc are all more restrictive with W2008 server.

IIS authentication mechanisms have changed. IIS now supports 64 or 32 bit application pools, your XP machine was probably only 32 bit.

IIS 5.1 is what you had on XP, IIS6 was only with Windows 2003 server. I don't think IIS 5.1 had the different anonymous IIS user accounts like IIS 6 & newer had, maybe you're working with the wrong user account for network access.

Anyway, I'd review firewall/network settings, IIS authentication settings, 64/32 bit settings. IIS used to have pretty comprehensive online docs to help you with all this.

Reply With Quote
  #5  
Old December 3rd, 2012, 11:19 AM
112233 112233 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 37 112233 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 59 m 6 sec
Reputation Power: 5
Thanks for all your help.

Problem has been solved.

Solution:

changed the shortcut, in stead of using the mapped drive name, we changed to use the server name directly.

Hope it will be helpful for someone.

Reply With Quote
  #6  
Old December 3rd, 2012, 03:21 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,238 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 7 m 57 sec
Reputation Power: 4445
Thanks for posting your solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > IIS7 PHP access network file: access is denied error

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap