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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System/exec/shell_exec a vbs file

Status
Not open for further replies.

Jiminald

Programmer
Oct 11, 2006
39
GB
Hi,

I have a page that resets the selected users password. To do this I have a vbs script to reset the user.
As the script runs it creates a file at the end stating whats happened during the reset procedure.
If I run the file manually, it works, but under php the vbs executes but it cannot create the file.

Maybe it could be due to apache running under as a service?!

Im running Server 2003 with apache2 installed as a service and php 5. The VBS file accesses the Active Directory.

Thanks in advanced!
 
i suspect it is because the vbscript is run under the apache user's privileges and those permissions do not extend to writing the relevant output file in the relevant directory. can you grant the apache user the relevant write privileges for that directory without compromising security?
 
What user is that? LOCAL_SERVICE??? Or is it better if I create my own apache user for the domain?
 
you will have provided a user name/pwd for the apache process to run under.

get_current_user() should tell you which that is.
 
My user is SYSTEM, it has full inheritable rights yet still no file is written.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top