I 've been trying to setup a Samba Share in FreeNAS -11.2-U7 for a couple of days now, and no matter what parameters I use both server side or client side (Xubuntu 18.04), can’t get it to work like I expect.
This share is based on a dataset that includes all my files for Plex. It has been mounted as a mount point to the Plex jail. I want to be able to copy files from the client to the share and have them have 0777 permissions, in order for the Plex Server to be able to scan its libraries.
But despite everything I tried, each new file or folder, gets 770 permissions and thus the Plex user in the jail does not scan it. I’ve tried file_mask and directory_mask, force create, both server side and client side options (fstab). The dataset permissions are 777 recursively applied.
It must be something simple that I miss. Any ideas?
I thought of something like that but since the Plex plugin is in a jail, isn’t it agnostic of the system users in Freenas? Dataset onwer and group is “media”. New files and directories get media:media 0770. How could I have a jails user “sort of map” to a system user?
Tried creating user “media” and group “media” in the Plex jail with the same uid, gid as in Freenas and adding group “media” as a secondary group to Plex but to no avail.
Also as a side note. I find smb implementation in FreeNAS to be different than Linux. I’ve discovered this trying to play around with permissions in relation to TimeMachine Shares. I’ve asked a lot of questions in the FreeNas forums in relation to permissions and such (and as why the same smb.conf file produces different results in Freenas 11.2U7 vs Arch) and really haven’t received a great explanation. There are a lot of things going on under the hood with smb in relation to FreeNAS and the developer writing the code keeps referencing 11.3 as when these changes will take place.
After rant
perhaps posting the relevant sections of your smb.conf file will help.
I changed the config so many times around there is no point to it.
Thanks for the interest.
I went another way and it worked.
I created a user “plex” in freeNAS, with uid=972 (the same with the user plex in the plugin jails), member of “media” group and assigned the ownership of the media dataset to it. Problem solved.