From da989b473dc6b812646b65437f96ff5b9e3af3a4 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 26 Jun 2016 10:23:56 -0400 Subject: [PATCH] rofiles-fuse: Do allow fchmod/fchown on directories The program is called ro*files* and ostree creates physical copies of directories, so changing them is fine. I hit this when trying to do a copy checkout onto an rofiles-fuse mount. Closes: #368 Approved by: jlebon --- src/rofiles-fuse/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c index bdf7ffb8..8468276d 100644 --- a/src/rofiles-fuse/main.c +++ b/src/rofiles-fuse/main.c @@ -261,8 +261,11 @@ can_write (const char *path) else return -errno; } - if (!devino_set_contains (stbuf.st_dev, stbuf.st_ino)) - return -EROFS; + if (!S_ISDIR (stbuf.st_mode)) + { + if (!devino_set_contains (stbuf.st_dev, stbuf.st_ino)) + return -EROFS; + } return 0; }