Re: Fedora 4, sitecopy and sftp problems

Neil Cherry <[email protected]> Mon, 02 Jan 2006 04:36:46 -0500
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
Neil Cherry wrote:
> I'm trying to update a site using sftp. I've verified that I
> can manually use ssh and sftp to send and receive files. When I
> try to update the site it only gets this far:
> 
> sitecopy -u --debug=sftp test
> sitecopy: Updating site `test' (on cookie.uucp in ~/test/)
> Creating linuxha/htdocs/: Connecting to cookie.uucp...
> 
> This will hang until I kill it.
> 
> If I switch it to protocol rsh with ssh then it works fine.
> I noticed one other person having problems but I didn't see
> an answer. BTW, I have no problems with sitecopy and sftp
> with an older Gentoo setup.

I threw in some more debugs to find out what's going on and I
come up with this:

$ ./sitecopy -u test -d sftp
sitecopy: Updating site `test' (on cookie.uucp in ~/test/)
Creating linuxha/htdocs/: *** Entering sftp_connect
*** sftp_connect post fork
*** sftp_connect post fork
*** sftp_connect preread
*** read_sftp
Connecting to cookie.uucp...

^C
sitecopy: Caught signal: Interrupt (2)
sitecopy: Aborting update...
sitecopy: Aborted.

Here's where it gets stuck:

static int read_sftp(sftp_session *sess) {
     size_t pos = 0;

     do {
         NE_DEBUG(DEBUG_SFTP, "*** read_sftp\n");

         ssize_t ret = read(sess->fd_in, sess->buf+pos, BUFSIZ-pos);
         if (ret < 0) return SITE_FAILED;
         if (ret == 0) break;
         pos += ret;
         sess->buf[pos] = '\0';

	NE_DEBUG(DEBUG_SFTP, "*** read_sftp %s\n", sess->buf);
     } while (strchr(sess->buf, '>') == NULL && pos < BUFSIZ);
     NE_DEBUG(DEBUG_SFTP, "(%s)", sess->buf);
     return SITE_OK;
}

When I run sftp from the command line I get this:
$ sftp cookie.uucp
Connecting to cookie.uucp...
sftp>

-- 
Linux Home Automation         Neil Cherry       [email protected]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site
_______________________________________________
sitecopy maillist  -  [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy