Copy link to clipboard
Copied
Hello, everyone,
Is it possible to add a script (.cfm file) to /CFIDE/Administrator and run it?
I've got a script that is used for reindexing and optimizing a small set of Solr collections, and the PTB do not want it publicly accessible (even though it will never touch a database, and I have conditions set so that only one of us can run it), so they are asking if it can be run from within the protected /CFIDE/Administrator folder.
I copied my script (and an associated .gif image) to my local CF server /CFIDE/Administrator folder, but I can't run it. Every time I browse to it, I get redirected to the login page.
V/r,
^_^
Copy link to clipboard
Copied
Yes, you may add an arbitrary CFM page to /CFIDE/Administrator and run it. But you first have to log in to the Administrator. That is why ColdFusion redirects you to the login page. As you yourself say, the /CFIDE/Administrator folder is protected.
Copy link to clipboard
Copied
Thanks, BKBK! It didn't even occur to me to log on, first.
But that could present a problem, if I wanted to add a script and then set it up in Scheduled Tasks, wouldn't it? Requiring a logon, first? Or would Scheduled Task run it with Admin privileges?
V/r,
^_^
Copy link to clipboard
Copied
To be quite honest, WolfShade, even if it should work, I would strongly advise against it. /CFIDE/Administrator/ is a system directory. As such, it should contain no custom user scripts.
A solution is possible that involves putting the script and GIF in a directory elsewhere in the web root. You could, for example, implement authentication in the directory or exclude its path in the web server settings. You should revisit the subject with your PTB and discuss these possibilities with them.
Copy link to clipboard
Copied
I kind of thought that was the case.. the higher-ups thought that would be a protected area to put a script in. It didn't SEEM correct, to me, but wanted to be absolutely sure before saying anything to them.
Thanks, BKBK!
^_^