From: Colin Walters Date: Sun, 26 Jun 2016 14:23:56 +0000 (-0400) Subject: rofiles-fuse: Do allow fchmod/fchown on directories X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~407^2^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=da989b473dc6b812646b65437f96ff5b9e3af3a4;p=ostree.git 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 --- 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; }