 diff --git a/server/fd.c b/server/fd.c
-old mode 100644
-new mode 100755
-index 990a1a708a..227aaca11e
+index 990a1a708a..66b267e3b7 100644
 --- a/server/fd.c
 +++ b/server/fd.c
 @@ -203,6 +203,7 @@ struct fd

     fd->access = access;
     fd->sharing = sharing;
 
@@ -1580,6 +1583,24 @@ static unsigned int check_sharing( struct fd *fd, unsigned int access, unsigned
         }
     }
 
+    if ( sharing == 0 ) {
+        //fprintf(stderr, "creating WRITE lock on file\n");
+        if (!add_lock( fd, FALSE, 0, -1 )) {

+        fd->implied_lock = 1;
+    }
+
     return 0;
 }
 