NFS: You require permission from S-1-1-0 problem

Hello everyone,
I re-did my NAS fileshares and disabled Samba and switched to NFS instead.
I then mapped my drives in Windows.

I can read all files without problems but I cannot write to any of them.
I mapped the drives as root user (only user I am using except for the SSH/SFTP user (which does not work for NFS). So I should have full rw access.

My exports file is

/mnt        *(fsid=0,ro,sync,no_subtree_check)
/mnt/sda1	192.168.0.0/24(rw,sync,no_subtree_check)
/mnt/sdb1	192.168.0.0/24(rw,sync,no_subtree_check)
/mnt/sdc1	192.168.0.0/24(rw,sync,no_subtree_check)
/mnt/sdd1	192.168.0.0/24(rw,sync,no_subtree_check)

Does anybody know why I do not have rw access but ro? I tried playing with the ro of the fsid=0, but that did not change anything.

Thank you all :slight_smile:
Alex

why not only share /mnt, with rw ?

I wanted to but that is not possible because it is OverlayFS. At least it does not work and is reported here: https://github.com/openwrt/packages/issues/15633#issuecomment-1447700113

then don't use /mnt as mount point ?

That is the automatic mount point directory used by OpenWRT's built-in automatic mounting.

you realize it's one line per drive, if you do it manually in rc.d, right ?

and if mounting /mnt/sda1 works, create /mnt/mnt, then mount those drives there, and share /mnt/mnt.

I admit that I did not know that. Which file do I need to change in rc.d?

rc.local I guess ...
you can edit it via the web ui too, it's called local start up script, or something like that.

Ah, you mean I need to enter a new command or I need to change an existing one?

P.S.: Do you think that that is the root of the issue?

if you add it to rc.local, you need to disable the auto mounter.

but I think you should just do the other option, mount the drives in /mnt/somedirname, then share that.

I still don't understand yet how/why that will solve the issue. If it is a different subdir of /mnt/, how is that different from sharing /mnt/sda1/ ?

it's just sharing one dir, instead of 5, the end result should be the same,
and you shouldn't have to deal with different permissions for the mount point,
and the sub folders.

That would be nice, but I need to solve the actual issue of not being able to write first. Then come the cosmetics :slight_smile:

I would stick to Samba4 if I could make it work on Windows 11. But I have failed so far.

try sharing /mnt/somedir without any subdirs, see if it works.

there's always ksmbd.

1 Like

Very little information on that in the docs. I will check it out and see if I can get it up and running.

there's Ksmbd (Samba3/4 alternative, ex cifsd/smbd) package support thread

1 Like

So, the initial issue remains open, unfortunately. But since a working Samba fileshare is more useful than NFS, I now switched to ksmbd and got that working nicely so far. Still need to test it with larger file transfers, but I hope it will now work reliably.