2022-03-25, 20:54
I am running into NFS issues with certain folders. These folders are not owned by the user running kodi, but they have full rwx rights via group. If I mount the directories manually outside of kodi, I have full access to them, but within kodi, I don't.
My /etc/exports is as follows:
(I do have other shares, but those don't have any issues, so I removed references to them to minimize confusion.)
Within /share/gothrough, most is owned by my normal user (jbhansen:users), but my incoming torrent directory and its subfolders are owned by vpn:vpn with 770 permissions (set via facl, see below for details) until I can manage to sort the files and place them in their proper location with proper permissions. jbhansen is a part of the vpn group on both my server and kodi machines and all uids/gids match on both machines.
If I manually mount my nfs share onto my htpc, jbhansen can access all the folders normally, including the ones owned by vpn:vpn that have 770 permissions. However, if I try and access those same folders on the same machine, but from within kodi using its built-in NFS client, I am unable to access vpn:vpn owned files with 770 permissions. I have to adjust those permissions to 777 if I want to watch anything before sorting.
Here's the specific error message from my kodi.log:
The manually mounted folder works fine:
Permissions for /share/gothrough/torrent/completed are set via facl. Here's the settings:
I've tried my hand at enabling logging for NFS, but all I can see is an overall authentication when I access the share itself, which is approved. I'm not seeing any error messages when trying to access a specific folder.
Is it possible that kodi uses a default user for nfs shares that isn't tied to the user running kodi? The user nobody was mentioned a few times in the NFS kodi wiki entry, but it didn't seem to imply that the user nobody was used to access nfs shares (unless you set it that way in your exports).
I can provide full kodi logs if needed or any logs from the htpc or server.
Any suggestions?
My /etc/exports is as follows:
Code:
# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.
/share/gothrough *(rw,insecure,sync,root_squash,subtree_check)
(I do have other shares, but those don't have any issues, so I removed references to them to minimize confusion.)
Within /share/gothrough, most is owned by my normal user (jbhansen:users), but my incoming torrent directory and its subfolders are owned by vpn:vpn with 770 permissions (set via facl, see below for details) until I can manage to sort the files and place them in their proper location with proper permissions. jbhansen is a part of the vpn group on both my server and kodi machines and all uids/gids match on both machines.
If I manually mount my nfs share onto my htpc, jbhansen can access all the folders normally, including the ones owned by vpn:vpn that have 770 permissions. However, if I try and access those same folders on the same machine, but from within kodi using its built-in NFS client, I am unable to access vpn:vpn owned files with 770 permissions. I have to adjust those permissions to 777 if I want to watch anything before sorting.
Here's the specific error message from my kodi.log:
Code:
2022-03-25 12:27:40.500 T:140134501062400 ERROR: Failed to open(//torrent/completed/Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine/) opendir call failed with "NFS: READDIRPLUS of /torrent/completed/Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine) failed with NFS3ERR_ACCES(-13)"
2022-03-25 12:27:40.500 T:140134501062400 ERROR: GetDirectory - Error getting nfs://10.0.0.152/share/gothrough/torrent/completed/Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine/
2022-03-25 12:27:40.501 T:140135003467520 ERROR: CGUIMediaWindow::GetDirectory(nfs://10.0.0.152/share/gothrough/torrent/completed/Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine/) failed
The manually mounted folder works fine:
Code:
jbhansen@febtober:~$ sudo mount -t nfs 10.0.0.152:/share/gothrough /mnt/hd
jbhansen@febtober:~$ mount -t nfs
10.0.0.152:/share/gothrough on /mnt/hd type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.0.0.152,mountvers=3,mountport=58368,mountproto=udp,local_lock=none,addr=10.0.0.152)
jbhansen@febtober:~$ ls -la "/mnt/hd/torrent/completed/Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine/"
total 1235508
drwxrws---+ 2 vpn vpn 4096 Mar 9 19:10 ./
drwxrws---+ 137 jbhansen vpn 36864 Mar 25 11:52 ../
-rw-r--r-- 1 vpn vpn 1265110752 Mar 9 19:10 Big Buck Bunny 4K UHD HFR 60 fps FLAC WEBRip 2160p X265 ZMachine.mkv
Permissions for /share/gothrough/torrent/completed are set via facl. Here's the settings:
Code:
jbhansen@craven-moorhead:~$ getfacl /share/gothrough/torrent/completed/
getfacl: Removing leading '/' from absolute path names
# file: share/media/torrent/completed/
# owner: jbhansen
# group: vpn
# flags: -s-
user::rwx
group::rwx
group:vpn:rwx
mask::rwx
other::---
default:user::rwx
default:group::rwx
default:group:vpn:rwx
default:mask::rwx
default:other::---
I've tried my hand at enabling logging for NFS, but all I can see is an overall authentication when I access the share itself, which is approved. I'm not seeing any error messages when trying to access a specific folder.
Code:
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: Received NULL request from 10.0.0.125
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: Received EXPORT request from 10.0.0.125.
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: Received NULL request from 10.0.0.125
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: Received MNT3(/share/gothrough) request from 10.0.0.125
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: authenticated mount request from 10.0.0.125:41448 for /share/gothrough (/share/gothrough)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: Received EXPORT request from 10.0.0.125.
Mar 25 12:27:40 craven-moorhead rpc.mountd[24778]: check_default: access by 10.0.0.125 ALLOWED (cached)
Is it possible that kodi uses a default user for nfs shares that isn't tied to the user running kodi? The user nobody was mentioned a few times in the NFS kodi wiki entry, but it didn't seem to imply that the user nobody was used to access nfs shares (unless you set it that way in your exports).
I can provide full kodi logs if needed or any logs from the htpc or server.
Any suggestions?