I'm missing something in my nfs share

@vasileios If you get a moment could you look this over. I know I’m missing something but I can’t spot it.

I’m missing something in my nfs share… Not even sure what it is “permissions” wise.

Share has been sudo chown nobody:nogroup /pathto/share and sudo chmod 755 -R /pathto/share and in /etc/export is /pathto/share,sync,no_root_squash,no_subtree_check) ran sudo exportfs -a

client fstab IP:/pathto/share /pathto/mount nfs rw,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0

Reboot and mount stays, can create new, rename folders in Thunar remotely, cannot rename files under folders I just renamed.

Hey @MrDeplorableUSA!
Yes, I can see where the issue is.
What you’ve basically set up is a no-owner share. The permissions for the group (nogroup) and the rest (everybody) are set to Read & Execute only. If you’re the only person using the share, then I’d recommend doing a sudo chown -R yourusername:yourusername /pathto/share so that you can login normally with your own username.

If you have more users trying to get files, then I recommend opening up the permissions (as long as your share is not out on the Internet), by executing:

sudo chmod -R 777 /pathto/share

The general permissions are as follows:
0 for no permissions
1 for Execute
2 for Write
4 for Read

Those numbers are additive. So, when you have a permissions command, they stand for chown XYZ where:
X = Owner
Y = Group
Z = Everyone else

I hope this helps. :slight_smile:

I have fixed the user permission and newly created file permission I believe with ** set facl** as well as group ownership of drive and all files for “users” and added all users to the group. “terminal” wise all users can modify any files created by other users in users group as well as delete, but no “execute”, essentially 766

Now I cannot get back to being able to mount the drive on remote clients. I’ve fried my brain over this.

"server side" fstab entry
UUID=f2a4c3d1-394e-4d87-87f2-1281650b9e0f /media/media ext4 rw 0 2

"server side" exports entry(yes I ran exportfs -a and reloaded server)

server status
● nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2022-07-09 22:04:23 EDT; 9h ago
Process: 7954 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 7955 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Main PID: 7955 (code=exited, status=0/SUCCESS)
CPU: 12ms

Jul 09 22:04:22 livingroom systemd[1]: Starting NFS server and services…
Jul 09 22:04:23 livingroom systemd[1]: Finished NFS server and services.

server and all remote clients(using server IP) return:
root@livingroom:/# rpcinfo -p localhost
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100003 4 tcp 2049 nfs

server side nfsv2/v3 disabled in /etc/defaults/nfs-kernel-server
root@livingroom:/# cat /proc/fs/nfsd/versions
-2 -3 +4 +4.1 +4.2

su - at any remote client(via ssh) and run
root@BillsLaptop:~# showmount -e
clnt_create: RPC: Program not registered

also from “server” I tried several
root@livingroom:/# showmount -e localhost
clnt_create: RPC: Program not registered
root@livingroom:/# showmount -e
clnt_create: RPC: Program not registered
root@livingroom:/# showmount -e
clnt_create: RPC: Program not registered

I’m quite open to suggestions at this point LOL
If you need any more details just let me know

Not sure which service restart fixed it but SO FAR I now have everything working now. Had to re-enable v3 for LibreELEC on the Pi4s as they, LibrELEC as of 3/22 stable image, stilldo not support NSFv4.

1 Like