0

I like to make a read only share for a user whom has access to several root folders in my fileserver. I don't want to create a bunch of shares for each folder, can I somehow add multiple paths in smb.conf?

Eg:

path=/folder1, /folder2

Edit: Without using Symlinks. I understand the Unix FS, but don't want to clutter things up with Symlink, if I have to, I will, but I'd prefer to use path= as its seems simpler/better.

4
  • Look here: unix.stackexchange.com/questions/5120/… Commented Mar 20, 2018 at 9:33
  • I'm not looking to use symlinks, I considered it, but I'd rather create separate SMB shares vs symlinks. Commented Mar 20, 2018 at 9:37
  • The documentation is pretty clear: path points to "a directory", with no mention of more than one. Making a directory with a few symlinks is likely easier for future management of the share anyways, as you don't have to always edit and reload the configuration file.
    – ErikF
    Commented Mar 20, 2018 at 9:45
  • @ErikF I believe you are correct, so the answer to my question is NO, use symlinks and follow symlinks = yes. You can write up an Answer if you want Commented Mar 20, 2018 at 9:46

1 Answer 1

1

The documentation is pretty clear:

path (S)

This parameter specifies a directory to which the user of the service is to be given access. [...]

The share path points to "a directory", with no mention of more than one. I can think of several reasons for this: first, it's in keeping with how Unix treats filesystems in general (for example, NFS shares behave the same way); and second, it's difficult to come up with a good way to merge directories in general without potential filename collisions.

Making a share that points to a directory with a few symlinks is likely easier for future management of the share anyways, as you don't have to always edit and reload the configuration file.

2
  • It just seems a simple option to add comma separated paths, infact, I noticed (S), What would that be for? But, I suspect this is correct regardless. Commented Mar 20, 2018 at 9:58
  • 1
    (S) means that the directive is for shares only; (G) means it's a [global] directive.
    – ErikF
    Commented Mar 20, 2018 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .