diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 2fef7eba5d..0d6c75ec5f 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -1760,7 +1760,9 @@ HandleLocking(Vnode * targetptr, struct client *client, afs_int32 rights, ViceLo 0; Time += AFS_LOCKWAIT; if (LockingType == LockRead) { - if ( !(rights & PRSFS_LOCK) ) + if ( !(rights & PRSFS_LOCK) && + !(rights & PRSFS_WRITE) && + !(OWNSp(client, targetptr) && (rights & PRSFS_INSERT)) ) return(EACCES); if (targetptr->disk.lock.lockCount >= 0) {