Created attachment 3117 [details] Suggested patch 1 sshfs does not currently support forwarding flock(2) operations to the remote host. This report is about implementing the necessary parts in the sftp-server program. The sshfs side has its own pull request at https://github.com/libfuse/sshfs/pull/55 The suggested patch is uploaded to https://github.com/openssh/openssh-portable/pull/66 and also attached to this bug report. The patch adds support for file locking operations LOCK_EX|LOCK_NB and LOCK_SH|LOCK_NB to sftp-server. Allocate a new extension string for the flock operations.
Closing as WONTFIX, quoting Damien Miller from the pull request: Sorry, but we have no desire to add file locking to sftp/sftp-server. In fact, addition of file locking feature to the sftp protocol was why we never implemented versions of the protocol after 3.
We're using these patches at work, running software on top of sshfs which uses file locking, and they've been working great (we've battle tested them quite a lot). Is the decision to reject them 100% definitive? The patches look non-intrusive to me, and bring very useful functionality. Carrying patches is obviously not ideal, and we would be very happy if it they could be reconsidered upstream.
closing resolved bugs as of 8.6p1 release