I have setup a server jellyfin
(runs jellyfin) that stores all media on a separate hdd that is available via NFS share from my local PC. This works as intended but since NFS is direct attached its not super suitable for a family environment where users may upload their own media.
So, I've added a SMB server called cifs
that provides private storage for each user, and now I want to expose the jellyfin NFS share via SMB to all users of a specific group.
Server: jellyfin
The directory /nfs/jellyfin
is owned by jellyfin:jellyfin
, as such I squash all users to this user and group for the NFS mount (108:112).
# /etc/exports
/nfs/jellyfin 192.168.1.210(rw,sync,no_subtree_check,all_squash,anonuid=108,anongid=112)
Server: cifs
Mounts the NFS share at boot and is able to list everything inside. All smb users are also able to list contents if they belong to the jellyfin
group ID on the smb server (x:1004).
[jellyfin]
path = /samba/jellyfin
comment = Jellyfin Media Service
read only = no
valid users = @jellyfin
The /samba/jellyfin
directory permissions:
$ ls -lav /samba
total 15
drwxr-xr-x 4 108 112 4096 Aug 9 10:18 jellyfin
I think the problem is here (SMB sees the user 108:112 as rw) but those id's only exist on the jellyfin
server.
The problem
If I mount the NFS share directly to my PC by exporting it with the same arguments as above, I'm able to do anything with folders and files (create, delete, rename, etc). But when I attempt the same via the SMB share, I'm only able to list and read files, not edit or create.
Assumption
As the NFS share squashes all to the local jellyfin user and group, I assume my problem is on the SMB server, and that the SMB-server is preventing users from creating or edit files.
However, I'm not sure what is going wrong and why I'm able to list files, but not create or edit?
EDIT: So, I change the permissions on the NFS server for the jellyfin directory to 775, and now I can write - but that also means anyone can write and read from these directories, which isn't preferable. This also means that all_squash
is not applied on NFS mount via SMB?