<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ftp per shell script in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234004#M187134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to transfer a file per ftp to alfresco:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My shell script (called hourly from crontab):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ftp -n HOST &amp;lt; /tmp/ftp.input&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;the file ftp.input contains:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;user LOGIN PASSWORD&lt;BR /&gt;cd subdirectroy&lt;BR /&gt;binary&lt;BR /&gt;put /Path/File&lt;BR /&gt;bye&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If I just use ftp from command line I can put the file without problems but running the shell script aI get the error "command not recognized" when trying executing the put-command. I used the absolute path to File for put .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anything special with ftp to alfresco, why its not working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Mar 2010 21:17:10 GMT</pubDate>
    <dc:creator>thk</dc:creator>
    <dc:date>2010-03-29T21:17:10Z</dc:date>
    <item>
      <title>ftp per shell script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234004#M187134</link>
      <description>HiI want to transfer a file per ftp to alfresco:My shell script (called hourly from crontab):ftp -n HOST &amp;lt; /tmp/ftp.input‍the file ftp.input contains:user LOGIN PASSWORDcd subdirectroybinaryput /Path/Filebye‍‍‍‍‍If I just use ftp from command line I can put the file without problems but running t</description>
      <pubDate>Mon, 29 Mar 2010 21:17:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234004#M187134</guid>
      <dc:creator>thk</dc:creator>
      <dc:date>2010-03-29T21:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: ftp per shell script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234005#M187135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No there's nothing special.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem will probably be due to the different environment from running your script from your shell or via crontab.&amp;nbsp; From what you have posted I suspect that the ftp command is not on the path when used from crontab.&amp;nbsp;&amp;nbsp; Try making the ftp command absolute.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 09:57:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234005#M187135</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2010-03-30T09:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: ftp per shell script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234006#M187136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;my script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ftp -n HOST &amp;lt; /tmp/ftp.input&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;my exact ftp.input-file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;user admin admin&lt;BR /&gt;cd subdirectory&lt;BR /&gt;binary&lt;BR /&gt;put trigger_rules_execution&lt;BR /&gt;bye&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;running from crontab I get in /var/mail/root:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ftp: local: trigger_rules_execution: No such file or directory&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;running the script manually: ./script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Connected to 191.168.78.249.&lt;BR /&gt;220 FTP server ready&lt;BR /&gt;331 User name okay, need password for admin&lt;BR /&gt;230 User logged in, proceed&lt;BR /&gt;Remote system type is UNIX.&lt;BR /&gt;250 Requested file action OK&lt;BR /&gt;200 Command OK&lt;BR /&gt;local: trigger_rules_execution remote: trigger_rules_execution&lt;BR /&gt;522 Command not recognized&lt;BR /&gt;227 Entering Passive Mode (191,168,78,249,186,212)&lt;BR /&gt;150 File status okay, about to open data connection&lt;BR /&gt;226 Closing data connection&lt;BR /&gt;221 Bye&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Whats strange: if I run ftp from command line with&amp;nbsp; ftp &amp;lt;user&amp;gt;@&amp;lt;ip&amp;gt; the same put in the alfresco space works . &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I change the ip to another server (ftp put to a normal linux directory instead of to alfresco) and run the scripts the put also works with the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So where is the problem? The script seems to be ok (it works with a normal ftp transfer) and its also possible to transfer to the alfresco space with the user on command line but &lt;/SPAN&gt;&lt;STRONG&gt;not using the script&lt;/STRONG&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate any advice!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 11:45:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ftp-per-shell-script/m-p/234006#M187136</guid>
      <dc:creator>thk</dc:creator>
      <dc:date>2010-03-30T11:45:54Z</dc:date>
    </item>
  </channel>
</rss>

