From: Miklos S. <mi...@sz...> - 2006-02-23 09:45:10
|
> I just tried sshfs for the first time today, and after some debugging > have found a problem likely related to an old version of openssh. > > The server is sshd version OpenSSH_2.5.2p2 running on Redhat 7.1 (not > mine!). > > After some debugging, I see sshfs sending a truncate command and > receiving a successful response. However, the file remains unchanged on > the remote end. > > I realize it's unlikely, but is there anything I can hack in place to > make this work with such an old version of openssh? Well, an ftruncate() to zero can be worked around with the following patch. Plain truncate() already has a workaround for this, so removing the ftruncate() method just makes it fall back to regular truncate. Other truncates could in theory be worked around by copying the file, but that has a lot of problems of it's own. Does this patch help in your case? Thanks, Miklos Index: sshfs.c =================================================================== RCS file: /cvsroot/fuse/sshfs/sshfs.c,v retrieving revision 1.55 diff -u -r1.55 sshfs.c --- sshfs.c 10 Jan 2006 10:54:38 -0000 1.55 +++ sshfs.c 23 Feb 2006 09:42:19 -0000 @@ -1900,7 +1900,6 @@ .statfs = sshfs_statfs, #if FUSE_VERSION >= 25 .create = sshfs_create, - .ftruncate = sshfs_ftruncate, .fgetattr = sshfs_fgetattr, #endif }, |