Bug 217627 - ksmbd when having share path as fuse mount point - mount error(22): Invalid argument
Summary: ksmbd when having share path as fuse mount point - mount error(22): Invalid a...
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-03 11:32 UTC by stevek
Modified: 2023-07-04 02:13 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
attachment-5478-0.html (3.47 KB, text/html)
2023-07-03 22:59 UTC, stevek
Details

Description stevek 2023-07-03 11:32:16 UTC
Hi All,

Problem happened since the version 6.3.10 and the new 6.4.0 ( I believe it might be due to a bunch of ksmbd fixes )

I have a simple /etc/ksmbd/ksmbd.conf like below

```
cat /etc/ksmbd/ksmbd.conf
[doc]
        path = /mnt/sdb4/doc
        guest ok = no
        writable = yes
[data]
        path = /mnt/sdb4/data
        guest ok = no
        writable = yes

[global]
        netbios name = SMBD

```

When I mount I simply got the error

mount //note-local.kaykraft.org/doc /mnt/doc -o username=stevek,uid=stevek,gid=stevek,credentials=/home/stevek/.smbdoc
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

In the server side there is new kernel message (run dmesg) to show what the problem is.

Note that the /mnt/sdb4/doc is a fuse mount (gocryptfs mount point). So it might be related to how ksmbd and fuse permission even gocryptfs using option allow_other.

If I mount the `data` share it works fine.

All my share mount correctly on 6.3.9 and below.

Thanks for caring

Kind regards
Comment 1 stevek 2023-07-03 11:36:59 UTC
Just testing, it is interesting that if I add a sub folder as a share then it works. Example if share [doc] path is /mnt/sdb4/doc/A.

So it looks like the fuse mount point has the problem.
Comment 2 Bagas Sanjaya 2023-07-03 13:05:50 UTC
(In reply to stevek from comment #0)
> Hi All,
> 
> Problem happened since the version 6.3.10 and the new 6.4.0 ( I believe it
> might be due to a bunch of ksmbd fixes )
> 
> I have a simple /etc/ksmbd/ksmbd.conf like below
> 
> ```
> cat /etc/ksmbd/ksmbd.conf
> [doc]
>         path = /mnt/sdb4/doc
>         guest ok = no
>         writable = yes
> [data]
>         path = /mnt/sdb4/data
>         guest ok = no
>         writable = yes
> 
> [global]
>         netbios name = SMBD
> 
> ```
> 
> When I mount I simply got the error
> 
> mount //note-local.kaykraft.org/doc /mnt/doc -o
> username=stevek,uid=stevek,gid=stevek,credentials=/home/stevek/.smbdoc
> mount error(13): Permission denied
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log
> messages (dmesg)
> 
> In the server side there is new kernel message (run dmesg) to show what the
> problem is.
> 
> Note that the /mnt/sdb4/doc is a fuse mount (gocryptfs mount point). So it
> might be related to how ksmbd and fuse permission even gocryptfs using
> option allow_other.
> 
> If I mount the `data` share it works fine.
> 
> All my share mount correctly on 6.3.9 and below.
> 
> Thanks for caring
> 
> Kind regards

Do you have this issue on v6.3? And v6.1? Can you also try latest mainline?
Comment 3 stevek 2023-07-03 22:59:23 UTC
Created attachment 304540 [details]
attachment-5478-0.html

Hi Team,

I have not been aware of problems with all kernel versions until 6.3.10 and
upward, and 6.4.0.

Currently I have to use 6.3.9 due to this error, but now I have a work
around by moving the share dir down one level so I can return back to 6.4.0
now.

I will try the latest main line when I am at home tonight.

Thanks

On Mon, Jul 3, 2023 at 11:05 PM <bugzilla-daemon@kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=217627
>
> Bagas Sanjaya (bagasdotme@gmail.com) changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |bagasdotme@gmail.com
>
> --- Comment #2 from Bagas Sanjaya (bagasdotme@gmail.com) ---
> (In reply to stevek from comment #0)
> > Hi All,
> >
> > Problem happened since the version 6.3.10 and the new 6.4.0 ( I believe
> it
> > might be due to a bunch of ksmbd fixes )
> >
> > I have a simple /etc/ksmbd/ksmbd.conf like below
> >
> > ```
> > cat /etc/ksmbd/ksmbd.conf
> > [doc]
> >         path = /mnt/sdb4/doc
> >         guest ok = no
> >         writable = yes
> > [data]
> >         path = /mnt/sdb4/data
> >         guest ok = no
> >         writable = yes
> >
> > [global]
> >         netbios name = SMBD
> >
> > ```
> >
> > When I mount I simply got the error
> >
> > mount //note-local.kaykraft.org/doc /mnt/doc -o
> > username=stevek,uid=stevek,gid=stevek,credentials=/home/stevek/.smbdoc
> > mount error(13): Permission denied
> > Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel
> log
> > messages (dmesg)
> >
> > In the server side there is new kernel message (run dmesg) to show what
> the
> > problem is.
> >
> > Note that the /mnt/sdb4/doc is a fuse mount (gocryptfs mount point). So
> it
> > might be related to how ksmbd and fuse permission even gocryptfs using
> > option allow_other.
> >
> > If I mount the `data` share it works fine.
> >
> > All my share mount correctly on 6.3.9 and below.
> >
> > Thanks for caring
> >
> > Kind regards
>
> Do you have this issue on v6.3? And v6.1? Can you also try latest mainline?
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You reported the bug.
Comment 4 Bagas Sanjaya 2023-07-04 02:13:22 UTC
(In reply to stevek from comment #3)
> Created attachment 304540 [details]
> attachment-5478-0.html
> 
> Hi Team,
> 
> I have not been aware of problems with all kernel versions until 6.3.10 and
> upward, and 6.4.0.
> 
> Currently I have to use 6.3.9 due to this error, but now I have a work
> around by moving the share dir down one level so I can return back to 6.4.0
> now.
> 
> I will try the latest main line when I am at home tonight.
> 

And can you perform bisection between v6.3 and v.6?

Note You need to log in before you can comment on or make changes to this bug.