Re: [PATCH 0/7] fix up issues from djwong/fuse4fs-fork

Darrick J. Wong
2026-05-05T15:58:22Z

On Tue, May 05, 2026 at 09:21:44AM +0200, Theodore Tso wrote:
> On Mon, May 04, 2026 at 05:08:31PM -0700, Darrick J. Wong wrote:
> > Hm, curious. It's regrettable that I no longer have a Mac, and
> > therefore can't really do much investigating. If you give
> > -o default_permissions,allow_other , does that fix the problem?
> > If that fixes it, then fuse2fs has a bug somewhere in its own
> > permissions checking.
>
> Nice catch! Yes, using default_permissions does fix things. So now I
> need to figure out what changed between v1.47.4 and next, and what
> default_permissions does. I notice that in kernel mode we enable
> default_permissions?

Yes. Though the addition of allow_other and default_permissions was
exactly the same in 1.47.4.

> Can you give me a suggestion at what I might try to look at next?

Hrm. A bisect would be the best (but least conference-friendly) option
to narrow things down.

On Linux, adding "default_permissions" means that the kernel uses the
same permission checking code that it uses for in-kernel filesystems.
Without it, the fuse server is responsible for doing all permission
checking.

And now that I've tried it, there are bugs in fuse2fs' permission
checking (aka !default_permissions):

# fuse2fs /dev/sda /mnt -d -f -o iomap=0,allow_other
# mkdir /mnt/lost+found/frogs
# su - djwong
$ ls -d /mnt/ /mnt/lost+found/ /mnt/lost+found/frogs/
drwxr-xr-x 3 root root 4096 May 5 08:32 /mnt//
drwx------ 3 root root 16384 May 5 08:49 /mnt/lost+found//
drwxr-xr-x 2 root root 4096 May 5 08:49 /mnt/lost+found/frogs//

So I guess I'm still confused. I've wondered if fuse2fs should always
inject default_permissions?

--D