Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / November 2006



Tip: Looking for answers? Try searching our database.

CFEXECUTE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cdsdave - 26 Nov 2006 09:51 GMT
Hi,

We are trying to encrypt a data file and have built a batch file to do this.  
Calling the batch via CFEXECUTE just produces an empty output file each time
whereas calling the script from the command line produces the correct data.

<CFEXECUTE
                NAME="/bin/sh"
        TIMEOUT="60"
                ARGUMENTS="/tmp/shell.1"
           OUTPUTFILE="/tmp/output.1"
 >
 </CFEXECUTE>

The command /bin/sh /tmp/shell.1 outputs the correct data in /tmp/output.1 and
we have altered the permissions on the shell and clear text files to ensure
they are not causing a problem

Is there something obvious we are missing?

This is runing 7.0.2 on Linux
Giles B - 29 Nov 2006 20:41 GMT
just a thought - the value for 'name' should be the absolute path of the application you are wanting to execute - is what you are trying to run /bin/sh or /bin/sh/tmp/shell.1 ?
cdsdave - 30 Nov 2006 14:54 GMT
The solution!

Coldfusion was running under a user that did not have the capability to login
to /bin/sh this for some reason means that it can successfully create the
output file output.1 but not actually manage to put any content within it.

To resolve I edited /etc/passwd to change the nologin option to /bin/sh

This enabled us to then login to "su - username" and then execute "/bin/sh
/tmp/shell.1"  This produced the desired output to the command line.  On
reloading the coldfusion page the output was now generated within the page.

Giles> Thanks for your help the full command was actually /bin/sh /tmp/shell.1
so I passed the shell command as an argument rather than it being a complete
file name.

Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.