On Monday, April 04, 2005 06:54:18 PM -0400 Bill Sommerfeld
<sommerfeld%sun.com@localhost> wrote:
On Mon, 2005-04-04 at 18:39, Jeffrey Hutzelman wrote:
On most Unix systems, an SFTP server can guarantee to its client that I
can't get a lock on a file, but it can't guarantee that I won't just
write to the file without bothering to get a lock.
unix systems which implement mandatory file locking (typically
SVR4-derived) typically do so on a file-by-file basis -- one particular
combination of file mode bits was recast to mean that normally-advisory
byte-range locks become mandatory, blocking attempts to do I/O in
conflict with the lock. this prevents you from mixing advisory and
mandatory locks on the same file.
Correct. It also means that changing the locking mode requires changing
the file mode bits, which normally can be done only by the file's owner
or by a superuser.