Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: DNSCMD will not work in Perl script

by dasgar (Curate)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076571]
[marto]: sounds fun, the opposite of my weekend :P
[Corion]: marto: You wrote Perl? Or did you have to work (and wrote Perl)?
[marto]: the fun part, I had no fun this weekend, very stressful :)
[Corion]: But I feel an introductory talk gestating, working title "Reading CPAN" - how to read module documentation, how to judge a module, how to read the module tests/examples
[Corion]: marto: Ouch :-/ The kids are making trouble?
[Corion]: Meh - food becons, and colleagues are staring at me, talk to you later, sorry!

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-08-21 09:33 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (319 votes). Check out past polls.