IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 28th, 2005, 10:38 AM
thundza thundza is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 thundza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 7 sec
Reputation Power: 0
PHP accessing IIS access denied

Hey...

I'm am developing a intranet that uses PHP to set up an virtual directory for anybody that wants one. This script fails to execute everytime...

In php I use a system() call to call a batch file. (The batch file works locally when it is ran.) This is part of the output:


c:\Inetpub\wwwroot\PublicScripts>cscript.exe c:\inetpub\adminscripts\adsutil.vbs create w3svc/1/root/USER "IIsWebVirtualDir" -s:blackbox
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.


Permission denied
ErrNumber: 70 (0x46)
Error accessing the object: w3svc/1/root/USER
... (Following commands have the same error.)

Obviously I'm not providing the proper credentials... and I can't use the runas command either, since it's a web interface. Any ideas of how to fix this... and yes, I've already googled this.

Reply With Quote
  #2  
Old March 29th, 2005, 01:27 PM
richtom80 richtom80 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Gravesend » Kent » UK
Posts: 150 richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 9 h 43 m 37 sec
Reputation Power: 8
Send a message via MSN to richtom80
Right, I take it that PHP works most of the time? i.e you can make a phpinfo() call?

The next step is to allow access to the batch file, you probably have access to run it locally either under administrator privledges or system.. however, the user running the script (my guess IUSER_ServerName) doesn't have executable rights on that file? (Right click » Properties » Security Tab)

Reply With Quote
  #3  
Old March 29th, 2005, 02:12 PM
thundza thundza is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 thundza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 7 sec
Reputation Power: 0
Yeah, that's what I thought too... but I enabled the IUSR_NAME to be full administrator just for debugging purposes. I also did enable proper security rights for the batch file... I'm wondering if I have to do something with php to make it work... Haven't found the solution yet though...

Reply With Quote
  #4  
Old March 29th, 2005, 04:09 PM
richtom80 richtom80 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Gravesend » Kent » UK
Posts: 150 richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level)richtom80 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 9 h 43 m 37 sec
Reputation Power: 8
Send a message via MSN to richtom80
Doesn't sound like a php problem.. do the executables called in the batch file have the same privledges by IUSER? Also what version of IIS are u using, IIS5 or 6?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > PHP accessing IIS access denied


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway