• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFExecute and Bat issues

New Here ,
Mar 10, 2009 Mar 10, 2009

Copy link to clipboard

Copied

Here is my coldfusion page (gogogo.cfm):
quote:

<cfexecute name = 'c:\remotereboot.bat'></cfexecute>restarting

Here is the batch file (restartsun.bat):
quote:

shutdown /r /m \\sun /t 000

The page is on our server "Rotary" and I am trying to restart the networked server "Sun". If I run the batch file manually it works just fine, Sun restarts. And if I run the coldfusion page with a different batch file, like to restart the local server, it works just fine. But when I try to run the batch file off that coldfusion file, it won't work.

In other words:
I want to be on my computer and call www.website.com/gogogo.cfm (which is on the Rotary server) and have it run restartsun.bat and restart the Sun server and it will not do that.

Anyone have any idea?
TOPICS
Advanced techniques

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 10, 2009 Mar 10, 2009

Copy link to clipboard

Copied

FairBoxie wrote:
>
> Anyone have any idea?
>

First idea is permission issues. When you run the code it uses your
permissions, when ColdFusion runs it it uses the ColdFusion user's
permissions. By default this user only has permissions to the local
server it on which it is running.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2009 Mar 10, 2009

Copy link to clipboard

Copied

I hadn't thought of that! How do I let the other server have permission to run the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

So, *bump*.

Does anyone know how to give the one server permission to restart the other?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

FairBoxie wrote:
> So, *bump*.
>
> Does anyone know how to give the one server permission to restart the other?

Run the one server as a user that has permissions to do that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

Determine the username that is used to start/stop the given services on the target machine. Give THAT account permissions on the other machine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

This is all so over my head, I have hardly any server management experience. Does anyone know of an article or something I could read that talks about users and permissions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

Running ColdFusion as a specific user:
http://www.adobe.com/go/tn_17279

Note that the article above is from 2006. The book "ColdFusion 8 Web Application Construction Kit Volume 3: Advanced Application Development" by Ben Forta includes ColdFusion 8 specific setup instructions for running the CF server as a specific user.
http://www.forta.com/books/0321515471/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

This is all so over my head, I have hardly any server management experience. Does anyone know of an article or something I could read that talks about users and permissions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

I've followed all the steps in the previous article, and I have a user specified to run ColdFusion. Now how do I get that other server to use that user?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

quote:

Originally posted by: FairBoxie
I've followed all the steps in the previous article, and I have a user specified to run ColdFusion. Now how do I get that other server to use that user?


From tclaremont:
quote:

Determine the username that is used to start/stop the given services on the target machine. Give THAT account permissions on the other machine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2009 Mar 26, 2009

Copy link to clipboard

Copied

Yes, there is a user on the target server created that has permissions on the ColdFusion service, like the article said. How do I make the other server use that user? It won't let me find the user on the other server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 27, 2009 Mar 27, 2009

Copy link to clipboard

Copied

LATEST
The CF server user account should be one that has permissions both to run ColdFusion on your web server machine (Rotary) and permission to execute a service restart on the server (Sun). In a Windows environment this account would need to be a domain account, not a local machine account. For use on your network you should ask your network admin staff what setup is required.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation