Home directories: home vs homes vs username

  • I have some questions about how home directories are presented.


    Coming from Synology, enabling home directories does the following:


    • Creates a "homes" directory in the data root.
    • Creates <username> directories in the homes directory created above.
    • Presents the share \\nas\homes mapped to <data root>/homes to administrators who can browse all the sub home directories.
    • Presents the share \\nas\home mapped to <data root>/homes/<username> to each respective user (who ordinarily will not be able to browse other homes).

    I tried to replicate a similar behaviour in OMV (assume a new installation):

    • Create a new shared folder called "homes".
    • Activate "user home directory", selecting the above share.
    • Create one or more users.
    • Add the shared folder homes to the SMB shares list.

    It might be of note that I didn't add/remove any special permissions - I literally clicked okay through everything.


    This resulted in the following:

    • Creates a "homes" directory in the data root.
    • Creates <username> directories in the homes directory created above.
    • Presents the share \\nas\homes mapped to <data root>/homes to everyone, each of whom can browse other user directories.
    • Presents the share \\nas\<username> mapped to <data root>/homes to everyone, each of whom can browse other user directories.

    That last one is really unusual, as you end up with \\nas\<logged in username>\<any created user> in the file tree, so for foo:


    • \\nas\foo\foo
    • \\nas\foo\bar

    and for bar:

    • \\nas\bar\foo
    • \\nas\bar\bar

    Needless to say, this all seems very wrong :). I'm almost certain I've done something incorrect.


    Is there a standard way of creating users with home directories, and even better, for them to demonstrate a more intuitive behaviour (with a dynamic "home" share per user)?

  • You are absolutely correct. The option in question is available under SMB/CIFS -> Home directories. Enabling this gives me both "homes" and "username" shares as expected, each mapped to ./homes/<username>


    I would love to have a "home" (singular) directory as well as (or even instead of) "homes" - could this be configurable somewhere?


    EDIT: I see that this is a SAMBA issue, so will take it there and report back on how/if I have fixed it


    EDIT2: Samba doesn't appear to support this, so I'll mark this as resolved.

  • I've managed to do what I want by adding the following share to smb.conf, copied from a more vanilla share I created.


    [home]
    path = /srv/dev-disk-by-label/omvhomes/%U
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users =
    invalid users =
    read list =
    write list =


    This works great after a samba reload, but I suspect it will be lost once OMV retouches the smb.conf.


    Does OMV have a way to add custom shares like this safely?

  • Thanks for the tip. In the meantime I've found an even easier way - the webui's shared folders entry allows Samba placeholders. In other words:

    • Create a Shared Folder with a path: "omvhomes/%U/" and name "home"
    • Add this as an SMB share

    Each user then gets a dynamic SMB share to their user directory called home. In fact, you probably don't even need the "Home directories" option in SMB/CIFS any more (although I'll probably migrate to the more native solution eventually).


    My only question is whether having a shared folder with a Samba placeholder will cause issues for other OMV components or not. I'll only be using it for an SMB share (ie not for ftp etc), but would anyone know here?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!