2 Replies Latest reply on Nov 30, 2006 6:54 AM by cdsdave



      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.


      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
        • 1. Re: CFEXECUTE
          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 ?
          • 2. Re: CFEXECUTE
            cdsdave Level 1
            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.