I'm surprised that there would be no ftp transport supported so I'm writing because perhaps I'm overlooking the obvious. However looking in transfer.rb I see: ------ session_map[session] = case transport when :sftp prepare_sftp_transfer(session_from, session_to, session) when :scp prepare_scp_transfer(session_from, session_to, session) else raise ArgumentError, "unsupported transport type: #{transport.inspect}" end end ------
Is there a normal solution to using ftp if desired? Is this something I should try to add myself?
FTP was not included for a variety of reasons. Capistrano is built on
top of SSH, and everything it uses to communicate with the servers
runs over that transport (e.g., SSH itself, SFTP, and SCP). To add FTP
would require a significant change to how parallel commands are
processed. (It would actually be fairly hard to make FTP run in
parallel with other FTP commands, since it is a synchronous protocol).
Also, FTP is extremely insecure (you realize it sends the password in
clear text, generally, right?). I'd strongly recommend you avoid FTP.
On Wed, Jun 3, 2009 at 8:43 AM, Byron Saltysiak <byronsa...@gmail.com> wrote:
> I'm surprised that there would be no ftp transport supported so I'm
> writing because perhaps I'm overlooking the obvious. However looking
> in transfer.rb I see:
> ------
> session_map[session] = case transport
> when :sftp
> prepare_sftp_transfer(session_from, session_to, session)
> when :scp
> prepare_scp_transfer(session_from, session_to, session)
> else
> raise ArgumentError, "unsupported transport type:
> #{transport.inspect}"
> end
> end
> ------
> Is there a normal solution to using ftp if desired? Is this something
> I should try to add myself?
On Wed, Jun 3, 2009 at 10:46 AM, Jamis Buck <ja...@37signals.com> wrote:
> FTP was not included for a variety of reasons. Capistrano is built on
> top of SSH, and everything it uses to communicate with the servers
> runs over that transport (e.g., SSH itself, SFTP, and SCP). To add FTP
> would require a significant change to how parallel commands are
> processed. (It would actually be fairly hard to make FTP run in
> parallel with other FTP commands, since it is a synchronous protocol).
I'm only interested in using ftp to upload. It seems like it could be
added to that single command without requiring any changes to running
commands. I haven't delved too deeply yet so let me know if this is
crazy talk.
> Also, FTP is extremely insecure (you realize it sends the password in
> clear text, generally, right?). I'd strongly recommend you avoid FTP.
Point taken. If I can use sftp I will but I'm trying to move files
(via a utility account - not mine) to repository server within the
company firewall. Of course this is a server I don't control.
> On Wed, Jun 3, 2009 at 8:43 AM, Byron Saltysiak <byronsa...@gmail.com> wrote:
>> I'm surprised that there would be no ftp transport supported so I'm
>> writing because perhaps I'm overlooking the obvious. However looking
>> in transfer.rb I see:
>> ------
>> session_map[session] = case transport
>> when :sftp
>> prepare_sftp_transfer(session_from, session_to, session)
>> when :scp
>> prepare_scp_transfer(session_from, session_to, session)
>> else
>> raise ArgumentError, "unsupported transport type:
>> #{transport.inspect}"
>> end
>> end
>> ------
>> Is there a normal solution to using ftp if desired? Is this something
>> I should try to add myself?
On Wed, Jun 3, 2009 at 8:53 AM, Byron Saltysiak <byronsa...@gmail.com> wrote:
> I'm only interested in using ftp to upload. It seems like it could be > added to that single command without requiring any changes to running > commands. I haven't delved too deeply yet so let me know if this is > crazy talk.
The single-server scenario (which is just a special case of what Capistrano handles) could do FTP easily enough: you could even do it yourself within a task, manually, with Ruby's Net::FTP library. However, the general case (FTP'ing something to multiple servers at the same time) is going to be non-trivial, I suspect, and almost certainly won't just "drop in". I'd be happy to be wrong, though.
> Point taken. If I can use sftp I will but I'm trying to move files > (via a utility account - not mine) to repository server within the > company firewall. Of course this is a server I don't control.
If you can SSH, you should be able to SCP or SFTP, too? Unless the admins have disabled both of those, which is possible, but it might be worth communicating with them about it, since either of those are infinitely to be preferred over FTP.
On Wed, Jun 3, 2009 at 10:57 AM, Jamis Buck <ja...@37signals.com> wrote:
> On Wed, Jun 3, 2009 at 8:53 AM, Byron Saltysiak <byronsa...@gmail.com> wrote:
>> I'm only interested in using ftp to upload. It seems like it could be >> added to that single command without requiring any changes to running >> commands. I haven't delved too deeply yet so let me know if this is >> crazy talk.
> The single-server scenario (which is just a special case of what > Capistrano handles) could do FTP easily enough: you could even do it > yourself within a task, manually, with Ruby's Net::FTP library. > However, the general case (FTP'ing something to multiple servers at > the same time) is going to be non-trivial, I suspect, and almost > certainly won't just "drop in". I'd be happy to be wrong, though.
Thanks I just put together a shell script to do the ftp through a "run" but this seems better. It seems like a generic solution won't be easy but I can respond with my final solution if anyone else has a similar single-server upload via ftp problem.
>> Point taken. If I can use sftp I will but I'm trying to move files >> (via a utility account - not mine) to repository server within the >> company firewall. Of course this is a server I don't control.
> If you can SSH, you should be able to SCP or SFTP, too? Unless the > admins have disabled both of those, which is possible, but it might be > worth communicating with them about it, since either of those are > infinitely to be preferred over FTP.
Unfortunately, I'd already tried ssh and it's not allowing it. I've requested the ability to scp or sftp but we'll see. I have a feeling this box was setup as ftp only for some purpose (perhaps 3rd party integration or something?) and also purposely has limited other functionality. Hopefully I'm wrong.
On Wed, Jun 3, 2009 at 9:05 AM, Byron Saltysiak <byronsa...@gmail.com> wrote:
> Unfortunately, I'd already tried ssh and it's not allowing it. I've > requested the ability to scp or sftp but we'll see. I have a feeling > this box was setup as ftp only for some purpose (perhaps 3rd party > integration or something?) and also purposely has limited other > functionality. Hopefully I'm wrong.
Oh, wow, you can't even SSH? Then yeah, your script is going to be the way to go. Capistrano won't work for that scenario, at all. Capistrano really is exclusively SSH (by design).