daemon: Allow utimens to work for directories (RHBZ#761451).
[libguestfs.git] / daemon / utimens.c
index ae006c6..a9857db 100644 (file)
@@ -37,7 +37,7 @@ do_utimens (const char *path,
   int r;
 
   CHROOT_IN;
-  fd = open (path, O_WRONLY | O_NOCTTY);
+  fd = open (path, O_RDONLY | O_NOCTTY);
   CHROOT_OUT;
 
   if (fd == -1) {