Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: DNSCMD will not work in Perl script

by dasgar (Deacon)
on Feb 28, 2014 at 17:05 UTC ( #1076571=note: print w/ replies, xml ) Need Help??


in reply to DNSCMD will not work in Perl script

How it works is, I have a web form that I fill out and when I click Submit, it runs the .pl script and calls the .pm file which contains the dnscmd lines.
...when I take one of the lines of my script and run it from an elevated command line, it works and adds the entries

I could be wrong, but I believe the statements of yours listed above point to a permissions issue.

With the first statement, it sounds like you're running this as a script via a web server. Most web servers are running server side scripts with a restricted user account. Probably the web server's user account for responding to web requests does not have permissions to run the dnscmd.exe utility.

Even if you were to make that web server user account a member of the administrator user group (which I don't recommend you doing), your second statement points to another issue. Even with administrator level rights, you're having to use a command prompt with elevated permissions (i.e. a command prompt opened with "Run as Administrator"). Off hand, I'm not sure of how to accomplish this. This sounds a lot like the issue in someone else's recent post (Cannot execute external process).

Don't necessarily have answers for you, but thought this might help point you in the right direction.


Comment on Re: DNSCMD will not work in Perl script

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076571]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-09-22 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (206 votes), past polls