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.

  • Look here: unix.stackexchange.com/questions/5120/… – davidbaumann Mar 20 '18 at 9:33
  • I'm not looking to use symlinks, I considered it, but I'd rather create separate SMB shares vs symlinks. – FreeSoftwareServers Mar 20 '18 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 Mar 20 '18 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 – FreeSoftwareServers Mar 20 '18 at 9:46
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.

  • 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. – FreeSoftwareServers Mar 20 '18 at 9:58
  • 1
    (S) means that the directive is for shares only; (G) means it's a [global] directive. – ErikF Mar 20 '18 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.