Home directories: home vs homes vs username

    • OMV 3.x (stable)
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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:

      1. Creates a "homes" directory in the data root.
      2. Creates <username> directories in the homes directory created above.
      3. Presents the share \\nas\homes mapped to <data root>/homes to administrators who can browse all the sub home directories.
      4. 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):
      1. Create a new shared folder called "homes".
      2. Activate "user home directory", selecting the above share.
      3. Create one or more users.
      4. 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:
      1. Creates a "homes" directory in the data root.
      2. Creates <username> directories in the homes directory created above.
      3. Presents the share \\nas\homes mapped to <data root>/homes to everyone, each of whom can browse other user directories.
      4. 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)?
    • sshaikh wrote:

      Add the shared folder homes to the SMB shares list.
      I haven't use in a while samba with home folders, but i am pretty sure this step is wrong. You only need to activate enable home folders in general samba, don't need to add them individually to the share section
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • 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.

      The post was edited 2 times, last by sshaikh ().

    • 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:
      1. Create a Shared Folder with a path: "omvhomes/%U/" and name "home"
      2. 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?