Fwiw, the following upstream commit seems relevant.... commit 87d83b6ad2e52a3c867fe2f758e4eccaea145a10 Author: Petr Uzel <petr.u...@suse.cz> Date: Thu Sep 15 10:19:17 2011 +0200
flock: make flock(1) work on NFSv4 To pleace an exclusive lock on a file, NFSv4 requires the file to be opened RW because of the emulation of flock() by fcntl(): http://www.spinics.net/lists/linux-nfs/msg18502.html So instead of O_RDONLY, open the file in O_RDWR if access() indicates it is possible (unless shared lock is requested). From: Michal Kubecek <mkube...@suse.cz> Signed-off-by: Petr Uzel <petr.u...@suse.cz> This was first part of released v2.21 .... (It seems NFSv4 emulates flock by using fcntl according to code comment for EBADF error handling saying: "Probably NFSv4 where flock() is emulated by fcntl()." ) Regards, Andreas Henriksson -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org