Am 18.02.2026 um 14:26 hat Hanna Czenczek geschrieben:
> Since I actually took a look into how mounting with libfuse works[1], I
> now know that the FUSE mount options are not exactly standard mount
> system call options. Specifically:
> - We should add "nosuid,nodev,noatime" because that is going to be
> translated into the respective MS_ mount flags; and those flags make
> sense for us.
> - We can set rw/ro to make the mount writable or not. It makes sense to
> set this flag to produce a better error message for read-only exports
> (EROFS instead of EACCES).
> This changes behavior as can be seen in iotest 308: It is no longer
> possible to modify metadata of read-only exports.
>
> In addition, in the comment, we can note that the FUSE mount() system
> call actually expects some more parameters that we can omit because
> fusermount3 (i.e. libfuse) will figure them out by itself:
> - fd: /dev/fuse fd
> - rootmode: Inode mode of the root node
> - user_id/group_id: Mounter's UID/GID
>
> [1] It invokes fusermount3, an SUID libfuse helper program, which parses
> and processes some mount options before actually invoking the
> mount() system call.
>
> Reviewed-by: Stefan Hajnoczi <[email protected]>
> Signed-off-by: Hanna Czenczek <[email protected]>
This breaks the fuse-allow-other iotest for me.
It doesn't look to me like the test actually requires a read-only
export, so I'd suggest to just make it writable like below. I'll apply
this now, if there are any objections let me know so that we can change
it again before I send a pull request.
Kevin
diff --git a/tests/qemu-iotests/tests/fuse-allow-other
b/tests/qemu-iotests/tests/fuse-allow-other
index 19f494aefb1..eaa39f8f236 100755
--- a/tests/qemu-iotests/tests/fuse-allow-other
+++ b/tests/qemu-iotests/tests/fuse-allow-other
@@ -101,7 +101,8 @@ run_permission_test()
fuse_export_add 'export' \
"'mountpoint': '$EXT_MP',
- 'allow-other': '$1'"
+ 'allow-other': '$1',
+ 'writable': true"
# Should always work
echo '(Removing all permissions)'
diff --git a/tests/qemu-iotests/tests/fuse-allow-other.out
b/tests/qemu-iotests/tests/fuse-allow-other.out
index 3219fc35e05..62660b40bfc 100644
--- a/tests/qemu-iotests/tests/fuse-allow-other.out
+++ b/tests/qemu-iotests/tests/fuse-allow-other.out
@@ -12,7 +12,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65536
'id': 'export',
'node-name': 'node-format',
'mountpoint': 'TEST_DIR/fuse-export',
- 'allow-other': 'off'
+ 'allow-other': 'off',
+ 'writable': true
} }
{"return": {}}
(Removing all permissions)
@@ -41,7 +42,8 @@ stat: cannot statx 'fuse-export': Permission denied
'id': 'export',
'node-name': 'node-format',
'mountpoint': 'TEST_DIR/fuse-export',
- 'allow-other': 'on'
+ 'allow-other': 'on',
+ 'writable': true
} }
{"return": {}}
(Removing all permissions)
@@ -68,7 +70,8 @@ Permissions seen by nobody: 440
'id': 'export',
'node-name': 'node-format',
'mountpoint': 'TEST_DIR/fuse-export',
- 'allow-other': 'auto'
+ 'allow-other': 'auto',
+ 'writable': true
} }
{"return": {}}
(Removing all permissions)