House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Linux (CF-Linux)

Problem with ColdFusion EXecute

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Rex,
Mark Kruger
01/29/10 08:43 A
Tom,
Mark Kruger
01/29/10 09:42 A
Tom,
Mark Kruger
01/29/10 03:02 P
Ian,
Mark Kruger
01/29/10 08:57 A
Ian,
Mark Kruger
01/29/10 09:04 A
Its quite possible.
Ian Tait
01/29/10 09:12 A
Ian,
Mark Kruger
01/29/10 09:20 A
You've got a firewall, right? :-)
Ian Tait
01/29/10 09:22 A
Ian,
Mark Kruger
01/29/10 09:25 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/28/2010 10:42 PM

Ok folks, I have a difficult problem and googling does not seem to help. I have the following code that uses Cfexecute to run the "/conver/" script of the open source "image magic" code. I've successfull installed imagemagic from source. Here's the code: <cfexecute name="#pathToImageMagick##executableFile#"          arguments="#replace(actionString, '"', '', "All")#" timeout="#timeout#">       </cfexecute> This produces the following command line.... /usr/local/bin/convert /var/www/clients/site.com/html/userpics/1979385/p1010022.jpg -geometry 80x80+0+0> /var/www/clients/site.com/html/userpics/1979385/sm/p1010022.jpg The name part is "/usr/local/bin/convert" and the rest is the "arguments" part (watch for wrapping). I took this command string and ran it from the command line as root and it worked. I then used "sudo -u nobody" to run it again successfully... so the code is correct - or at least it works from the command line. I've tried fooling with the ownership of the /userpics directory but I don't really think that's the problem because the CFFILE action works fine and creates the initial file. Anyway - does anyone have any advice about working with the cfexecute tag? What should I be looking for? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com <http://www.cfwebtools.com/>; www.coldfusionmuse.com <http://www.coldfusionmuse.com/>; <http://www.necfug.com/>; www.necfug.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
rex
01/29/2010 06:07 AM

And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 08:43 AM

Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- command line. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
01/29/2010 09:36 AM

>  <cfexecute name="#pathToImageMagick##executableFile#" >        arguments="#replace(actionString, '"', '', "All")#" > timeout="#timeout#"> >       </cfexecute> Try this instead. <cfexecute name="/bin/bash"                         arguments='-c "#pathToImageMagick##executableFile# #replace(actionString, '"', '', "All")#"'                         variable="output"                         timeout="30" /> Then write 'output' to a file with CFFILE. -- Helping to vitalistically exploit B2C services as part of the IT team of the year 2010, '09 and '08 **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners.  We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 09:42 AM

Tom, Excellent... I'll give it a shot. Thanks Tom. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com >  <cfexecute name="#pathToImageMagick##executableFile#" >        arguments="#replace(actionString, '"', '', "All")#" > timeout="#timeout#"> >       </cfexecute> Try this instead. <cfexecute name="/bin/bash"                         arguments='-c "#pathToImageMagick##executableFile# #replace(actionString, '"', '', "All")#"'                         variable="output"                         timeout="30" /> Then write 'output' to a file with CFFILE. -- Helping to vitalistically exploit B2C services as part of the IT team of the year 2010, '09 and '08 **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word "partner" to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.  If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 03:02 PM

Tom, That actually did the trick... Thanks very much! -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com >  <cfexecute name="#pathToImageMagick##executableFile#" >        arguments="#replace(actionString, '"', '', "All")#" > timeout="#timeout#"> >       </cfexecute> Try this instead. <cfexecute name="/bin/bash"                         arguments='-c "#pathToImageMagick##executableFile# #replace(actionString, '"', '', "All")#"'                         variable="output"                         timeout="30" /> Then write 'output' to a file with CFFILE. -- Helping to vitalistically exploit B2C services as part of the IT team of the year 2010, '09 and '08 **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word "partner" to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.  If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Tait
01/29/2010 08:52 AM

Have you tried to capture the output to see whats happening?     <cfexecute name="#pathToImageMagick##executableFile#"       arguments="#replace(actionString, '"', '', "All")#"       timeout="#timeout#"       variable="LOCAL.output"       errorVariable="LOCAL.error"     /> Ian Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- "arguments" > part (watch for wrapping). >   > I took this command string and ran it from the command line as root > and it worked. I then used "sudo -u nobody" to run it again > successfully... so the code is correct - or at least it works from the command line. >   > I've tried fooling with the ownership of the /userpics directory but I > don't really think that's the problem because the CFFILE action works > fine and creates the initial file. Anyway - does anyone have any > advice about working with the cfexecute tag? What should I be looking for? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 08:57 AM

Ian, Yes... I use <cfsavecontent> around it (actually this was already a part of the tag) but there does not appear to be any result. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Have you tried to capture the output to see whats happening?     <cfexecute name="#pathToImageMagick##executableFile#"       arguments="#replace(actionString, '"', '', "All")#"       timeout="#timeout#"       variable="LOCAL.output"       errorVariable="LOCAL.error"     /> Ian Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- "arguments" > part (watch for wrapping). >   > I took this command string and ran it from the command line as root > and it worked. I then used "sudo -u nobody" to run it again > successfully... so the code is correct - or at least it works from the command line. >   > I've tried fooling with the ownership of the /userpics directory but I > don't really think that's the problem because the CFFILE action works > fine and creates the initial file. Anyway - does anyone have any > advice about working with the cfexecute tag? What should I be looking for? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Tait
01/29/2010 08:59 AM

If you haven't already - try capturing those 2 vars - you might see something different than in savecontent. Ian Ian, Yes... I use <cfsavecontent> around it (actually this was already a part of the tag) but there does not appear to be any result. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Have you tried to capture the output to see whats happening?     <cfexecute name="#pathToImageMagick##executableFile#"       arguments="#replace(actionString, '"', '', "All")#"       timeout="#timeout#"       variable="LOCAL.output"       errorVariable="LOCAL.error"     /> Ian Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- "arguments" > part (watch for wrapping). >   > I took this command string and ran it from the command line as root > and it worked. I then used "sudo -u nobody" to run it again > successfully... so the code is correct - or at least it works from the command line. >   > I've tried fooling with the ownership of the /userpics directory but I > don't really think that's the problem because the CFFILE action works > fine and creates the initial file. Anyway - does anyone have any > advice about working with the cfexecute tag? What should I be looking for? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 09:04 AM

Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com If you haven't already - try capturing those 2 vars - you might see something different than in savecontent. Ian Ian, Yes... I use <cfsavecontent> around it (actually this was already a part of the tag) but there does not appear to be any result. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Have you tried to capture the output to see whats happening?     <cfexecute name="#pathToImageMagick##executableFile#"       arguments="#replace(actionString, '"', '', "All")#"       timeout="#timeout#"       variable="LOCAL.output"       errorVariable="LOCAL.error"     /> Ian Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- "arguments" > part (watch for wrapping). >   > I took this command string and ran it from the command line as root > and it worked. I then used "sudo -u nobody" to run it again > successfully... so the code is correct - or at least it works from the command line. >   > I've tried fooling with the ownership of the /userpics directory but I > don't really think that's the problem because the CFFILE action works > fine and creates the initial file. Anyway - does anyone have any > advice about working with the cfexecute tag? What should I be looking for? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
01/29/2010 11:23 AM

> Yes... I did that in order to construct the exact command line string. My > thought was there is no default shell assigned to "nobody" - what do you > think of that idea? If nobody has no shell, it won't be able to execute shell commands - which is exactly what CFEXECUTE does. Other things won't work either, which is why the docs mention having a shell for nobody, if I recall correctly. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Tait
01/29/2010 09:12 AM

Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com If you haven't already - try capturing those 2 vars - you might see something different than in savecontent. Ian Ian, Yes... I use <cfsavecontent> around it (actually this was already a part of the tag) but there does not appear to be any result. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Have you tried to capture the output to see whats happening?     <cfexecute name="#pathToImageMagick##executableFile#"       arguments="#replace(actionString, '"', '', "All")#"       timeout="#timeout#"       variable="LOCAL.output"       errorVariable="LOCAL.error"     /> Ian Rex, Ok.... But wouldn't "sudo -u nobody" from the command line show me if "nobody" did not have permissions?  It's seems to work fine from the command line (and yes - cf is running as nobody). -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com And CF runs as the nobody user, correct? Try running CF as root and see if that works.  If it does, it's a permission issue with the nobody user (maybe nobody has permissions to execute convert).  If it does not, it may be an issue with cfexecute or something else. Mark Kruger wrote: ----- Excess quoted text cut - see Original Post for more ----- "arguments" > part (watch for wrapping). >   > I took this command string and ran it from the command line as root > and it worked. I then used "sudo -u nobody" to run it again > successfully... so the code is correct - or at least it works from the command line. >   > I've tried fooling with the ownership of the /userpics directory but I > don't really think that's the problem because the CFFILE action works > fine and creates the initial file. Anyway - does anyone have any > advice about working with the cfexecute tag? What should I be looking for? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 09:16 AM

Ok.. Do you know how to solve that issue?  How do I make sure that nobody has a shell? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 09:20 AM

Ian, Actually - I don't really WANT nobody to have a shell do I? Doesn't that mean a user could login via SSH as nobody with no password? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Ok.. Do you know how to solve that issue?  How do I make sure that nobody has a shell? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Tait
01/29/2010 09:19 AM

You can probably see by doing a cat of /etc/passwd (depending on your system) Its been a while since I've played with Linux - things may have changed :-) Ian Ok.. Do you know how to solve that issue?  How do I make sure that nobody has a shell? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Tait
01/29/2010 09:22 AM

You've got a firewall, right? :-) Have you tried starting coldfusion as root to see if this is the issue (as someone else mentioned)? Ian Ian, Actually - I don't really WANT nobody to have a shell do I? Doesn't that mean a user could login via SSH as nobody with no password? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Ok.. Do you know how to solve that issue?  How do I make sure that nobody has a shell? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
01/29/2010 09:25 AM

Ian, That's next on my list .... I have to look up the syntax for everything though. Linux just isn't second nature to me yet :) -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com You've got a firewall, right? :-) Have you tried starting coldfusion as root to see if this is the issue (as someone else mentioned)? Ian Ian, Actually - I don't really WANT nobody to have a shell do I? Doesn't that mean a user could login via SSH as nobody with no password? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Ok.. Do you know how to solve that issue?  How do I make sure that nobody has a shell? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Its quite possible. Ian Ian, Yes... I did that in order to construct the exact command line string. My thought was there is no default shell assigned to "nobody" - what do you think of that idea? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com


<< Previous Thread Today's Threads Next Thread >>

Search cf-linux

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference