Bug 2828

Summary: Extension for BSD style advisory file locking operations
Product: Portable OpenSSH Reporter: github
Component: sftp-serverAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: enhancement CC: elvstone
Priority: P5    
Version: 7.6p1   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Suggested patch 1 none

Description github 2018-01-31 23:54:36 AEDT
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.
Comment 1 github 2018-02-10 21:37:36 AEDT
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.
Comment 2 Elvis Stansvik 2019-10-18 01:51:45 AEDT
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.
Comment 3 Damien Miller 2021-04-23 15:04:32 AEST
closing resolved bugs as of 8.6p1 release