Subject: SFTP : Byte-range locks

From: "Nickolay L." <[email-masked]>
Date: Wed, 9 Nov 2005 16:45:23 +0200

Hello,

  In 10th version of draft-ietf-secsh-filexfer written :

  uLockMask
      A bit mask of SSH_FXF_ACCESS_BLOCK_* values; the meanings are
      described in Section 8.1.1.3.

  What means for server SSH_FXF_ACCESS_BLOCK_READ &
  SSH_FXF_ACCESS_BLOCK_WRITE, is clear. But what means two other
  flags, SSH_FXF_ACCESS_BLOCK_DELETE & SSH_FXF_ACCESS_BLOCK_ADVISORY?

-- 
  Best regards,Nickolay mailto:<[email-masked]>

---

From: Joseph Galbraith <[email-masked]>
Date: Wed, 09 Nov 2005 09:39:55 -0700

>   flags, SSH_FXF_ACCESS_BLOCK_DELETE & SSH_FXF_ACCESS_BLOCK_ADVISORY?

8.1.1.3 seems pretty clear on this.

If BLOCK_DELETE is specified, the file cannot be deleted.
This doesn't make much sense in a byte-range lock... I
suppose it needs a bit of text there.

If ADVISORY is specified, the server doesn't enforce the
locks.  In the context of byte-range locks, this means that
the server will not grant a second, overlapping byte-range
lock, but it will not stop other callers from reading / writing
the locked range.

If ADVISORY is not set, the server will do MANDATORY locking;
not only will it not grant a second, overlapping byte-range
lock, but it will also not allow any conflicting IO operation
to proceed.

Which kind of locking is supported by the server is reflected
in the "supported2" extension sent by the server during protocol
startup.

I'll try to clarify the locking here as it applies to byte
range locks.

Thanks,

Joseph