Question Folder Sharing - How to set up that users only see shared Folders

  • Hi There,

    i've got a problem using shares and configuring them. I don't know, if it's possible:

    I have 9 Users (u01 - u09) - each user has a shared folder: sf_u01 - sf_u09 (not the home directory of the user is shared, the folder is manually shared, home directory is not activated)
    i have 3 groups (g01-g03) - each group has a shared folder: sf_g01 - sf_g03

    So, if any of the users goes to \\omv and logs in with his data, he sees all user and group shares. He has only access to his own share, all others are restricted.

    My Question is:
    Is it possible that the logged in user can see only the folders he can access?
    I can set folders to "not browsable", but then nobody can see the folders.

    This is the point where i get stuck...

    Need help :-)


    Nochmal auf Deutsch:
    Hallo liebe Community,

    ich habe ein kleines Problem mit den Freigaben bei OMV.

    Ich habe:
    09 Benutzer (u01 - u09), jeder hat einen eigenen Shared Folder, sf_u01 - sf_u09
    03 Gruppen (g01 - g03), jede Gruppe hat einen Shared Folder, sf_g01 - sf_g03

    Ich habe die Heimazverzeichnisse für die Benutzer nicht aktiviert.
    Wenn sich jetzt irgendein Benutzer auf \\omv einloggt, sieht er automatisch alle Verzeichnisse - auch die der anderen Benutzer/Gruppen. Er hat keinen Zugang zu den Ordnern, aber er sieht sie.

    Ist es möglich, omv/samba so zu konfigurieren, dass der Benutzer nur sein eigenes Verzeichnis und das Verzeichnis seiner Gruppe sieht?
    Wenn ich auf "Durchsuchbar setzen" keinen Haken setze, dann sieht niemand mehr dieses Verzeichnis. Das hilft mir dann auch nicht mehr weiter :(
    Wenn weitere Benutzer hinzu kommen sollten, wird dies nämlich sonst irgendwann absolut unübersichtlich.

    Vielen Dank für eure Hilfe

  • I am not sure. But taking a guess you can't, because the conf file is processed in samba at start or restart not at user log. What I am trying to say is that the samba conf would need to change once a user is logged selectively, and I don't think that's possible.

    You could try host allow-deny but I am not sure if that would prevent browseable shares to be seen, is just to deny.

  • Hi subzero79,

    okay, that's what i thought already.

    My hope was that there is a key in samba.conf that i can set to each share, that allows "browsable by user" or something else...
    Damn ...
    Problem: I have about 90 Users and 21 Groups, and with browsable=yes u cant manage to find ur own folders...
    browsable = no, then u have to know all of ur share-names. and u can't see if u get a new shared folder for ur acc.

    So, another idea:
    A user logs in directly so \\omv\sf_u01 (browsable = no) and omv automatically creates symlinks to shared folders?
    Or is this impossible too? (or possible with many times of coding a cronjob that reads out samba.conf)

  • Okay, i tried it with "Home-Directory" for Users.
    There a User can only see his own home folder. Not the Folders of the other Users.
    Great. So, All i have to find out is, how to get it working with groups. :-/
    Samba already has the way to manage it, i think.


  • Not sure if this will help, but you can create samba configs specific to each user based on their username. If you create a file /etc/samba/smb.conf.<username> then any user logging in with that username will inherit the configs in that file (in addition to the configs in /etc/samba/smb.conf). You just need to reference the user-specific config with an "include" command.

    eg, in the [global] section, you'd have something like;

    include = /etc/samba/smb.conf.%U

    And then in each user-config file you could specify the details of their share access. For a lot of users, this would be a pain in the butt. But assuming everything is structured nicely, you could probably automate things with some shell scripts.

  • thx Tyberious Funk for your answer.
    I've found the same solution you posted.
    But i think, my shell scripting is not as good as needed to shell script things like this.

    somebody has tried/experience with
    access based share enum = yes

    Some people say, it works, others say it doesnt work as expected,while others say it doesnt work :(

  • can't get access based share enum to work.
    damn, why is there a var that manages my problem, but it doesn't work.

    searching with google shows many persons who have same problem, but no one gets it work.

    grrr, 24TB FileSystem for Office with 90Persons and there is no way to manage that people only see their accessible shares...

    even windows can manage this.

    it's making me sad :(

  • This thread is related to a very old version of OMV. Better you should create a new thread about your current problem.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!