How to display 2 paths in a share?

Hello I need help with my configuration.

I have a Dataset, lets call it tank.
there are 5 Folders inside tank:

/mnt/tank/data/folder1 to /mnt/tank/data/folder5

I want to create an SMB share “streaming_share”:

  • read only
  • displays only folder1 and folder2
  • accessible from user “streaming”

what I did:

  • at first I tried to add two paths to the share but didn’t know how.
  • I thought to do it with a correct user right, but am not skilled enough.
  • third way would be by creating a new folder and 2 subfolders and links folder 1 and 2 to the new folder with mount --bind /mnt/tank/data/folder1 /mnt/tank/data/streaming_folder/folder1

please what would be the most straight forward method of doing that.
(besides creating streaming_folder and than moving folder1 and folder2 there)

thank you.

I have bee using truenas core for ~2 years and now am using scale for ~2 years.

System:
Scale 24.10.0.2
PSU: Seasonic Core GM 500W
Mainboard: Gigabyte MJ11-EC1
CPU: AMD EPYC 3151 4core 8 threads
Ram: 2x 32GB MTA36ASF4G72PZ-2G3B1 ecc rdim
LSI 6Gbps SAS HBA 9240-8I IT Mode card
boot: 2x mirrored 128gb ssd
1 vdev 6x6GB HDD RaidZ2 WD red plus

Shares only have a single path. Typically the way you’d do what you want is configure permissions such that “streaming” user can only read folder1 and folder2.

thank you, but were do I set the permissions for the user?
the share is for /mnt/tank/data

I could only find how to edit permissions for data, but not how to change the permissions for the subfolders

You set permissions for a share (which is a dataset), including all folders in there. Mind the terminology.

You can have one read-only share for user “streaming”, with as many folders in there as you want.
Or, if other users are to have access to one folder but not the other, you can have two distinct shares with different permission sets, and then “streaming” has to mount two shares to have the two sets of files.

Filesystem permissions are defined on a per-file basis.

You can use the ACL editor on a Windows client for instance to disable inheritance on a given directory then modify its ACL to suit your needs.

Our APIs are also path-based and so can change permissions anywhere in /mnt, but it’s still not implemented in UI (since it’s more of a file manager feature).

There are a lot of potential solutions to this.

1 Like

I think screenshots of your datasets and how you have your sharing set up would help us see what you currently have setup. We are kind of guessing by your description.

Below are screenshots from my CORE system

Shay is parent and BU2 is the child dataset I have setup for SMB sharing. Everything inside is shared the same.

ACL Permissions screen. You can see I have SMBUSER as the owner of the dataset and that user was created just for SMB use.

Thanks for all the answers,
The solution was more or less “set correct access rights”

In the process i discovered that i had a bad access right set up in general and than managed to screw up access rights so that i needed to redo most of my shares. But I think i got it now.

thanks again for the help.

1 Like