Beginner - help setting up sharing/permissions for new server.

  • Hello,


    I am finally ready to try and move my Windows 10 server over to OMV, but have run into some initial questions.


    Here is what I currently have, hardware-wise:


    * An OMV Server with two large hard drives (I need to set up four folders - "music", "photos", "video" and "recordings")
    * 4 x Raspberry Pis, running Libreelec
    * Laptop, running Linux Mint
    * Desktop PC, dual-booting into Linux Mint and Windows 10
    * Various Android Tablets (some have Kodi installed)


    Software-wise:


    * I am going to install TVHeadend and have this record to the "recordings" folder and then steam the recordings via the TVH Kodi Plugin.
    * I am going to install Emby and have this stream ripped DVDs from the "videos" folder.
    * I need all devices to have access to the "music" and "photos" folders, generally.


    My first two questions (there will certainly be others as I put everything together):


    1. Should I share every folder via both NFS and Samba, given that the Desktop computer may sometimes be running Windows?
    2. Do I need to give special permission to the "recordings" and "video" folders so TVHeadend and Emby can use them?


    Thanks

  • 1. Should I share every folder via both NFS and Samba, given that the Desktop computer may sometimes be running Windows?
    2. Do I need to give special permission to the "recordings" and "video" folders so TVHeadend and Emby can use them?


    Thanks


    As a disclaimer, I am also a new user of OMV and Linux in general, but I think I can answer these questions (the best way to learn something is to teach it, right?).


    You'll want to create those four folders in the "Shared Folders" section of OMV. For media folders, I tend to set the permissions to "Everyone - Read/Write" because permissions/users tend to confuse me and this simplifies things greatly. Otherwise, you can leave it on the default settings. You'll need to create a user next, with a password, and it will automatically be added to the users group.


    Then, go to the SMB or NFS tabs, enable the services, and add the shared folders you already created. You will want to do both since you may browse from either OS. With NFS, you can specify read-only or read/write for each folder. With Samba, there's just a button to specify a certain folder as read-only. I was able to leave all the options at the default settings, but this section isn't too complicated.


    When you navigate to the shared folders from another OS, you'll simply be prompted to enter the username/password, so enter the credentials for the user you created in OMV.


    Sorry if I over-simplified this.

    • Official Post

    There are a lot of posts in the GUIDE section that are helpful.


    How to make a good Media share for Emby and PlexMediaServer

    I tried to PM you regarding OMV's doc's. I got an error message from the forum, "tekkb is already participating in too many conversations and cannot be added".


    Just FYI.

  • Thank you for that - I managed to connect to the shared files, via Samba, with Linux Mint - definitely encouraging.


    I think I will have to have a bit of a mess around with different settings and report back here when I have further problems.


    Once other quick thing - I completely forgot to change my two hard drives from NTFS to ext4, before I started to put data back on them. Is it advisable to use ext4, if possible?

  • Yes, you should be using ext4 or XFS, I'm still using ext4. You should only mount NTFS drives temporarily to move data to another drive that is formatted in a native linux filesystem (i.e. ext4 or XFS).


    @flmaxey I get lots of pms. My box is full. I need to delete some before people can pm me again.

    • Official Post

    @flmaxey I get lots of pms. My box is full. I need to delete some before people can pm me again.


    I'd appreciate that because, at some point (no rush), I need to touch bases with you regarding OMV doc's.


    Thanks

  • Right - already a quick issue.


    I set up a new shared folder called "Recordings" and then installed TVHeadend.


    TVHeadend asked for the path for storing recordings, so I put : /export/Recordings


    For some reason, I couldn't record anything, so I tried highlighting the folder in OMV and checking ACL.


    I noted that Owner and Group had Read/Write/Execute next to them but that Others had Read Only.


    I changed the Others permission to Read/Write/Execute and everything seems to work fine, now.


    1. Was I correct to use /export/Recordings for the recording path? The reason I ask is that I know that you can get to the same folder with /srv/dev-disk-by-label-Storage/Recordings. Is there any difference between these two paths and is one more correct than the other?


    2. It would seem that TVHeadend was installed as an Others user on my system. Was I correct in changing the Others permission for the folder to Read/Write/Execute or should I have done things a difference way?

    • Official Post

    With apologies for butting in:

    Note that most on the forum (myself included) will rarely go down the rabbit hole of permission issues. Why? There are some many ways to skin the cat. Security / restriction / access issues and solutions can range from very simple (Everyone: Full Control - Windows) - (Others: Read, Write, Exec - Linux) to very complex.


    First, note that many 3rd party app's will install a "system user". UrBackup installs a user called "urbackup". Emby installs a user called "emby". How these applications use their system user accounts is yet another consideration, and no two applications user their system accounts in the exact same way. **To find out more about the TVHead system user, and what it does, you'd need to visit their website.**


    When it comes to a folder, note that Linux file/folder permissions will override any permission assigned by Samba, or any other network service or application.


    Consider the following:
    - Note that the "Owner" is an individual user, "root".
    (This is the typical entry. "root", as the owner, is part of the create mask for a new folder.)
    - This is followed by the "Group" entry. In this case, any individual user that is in the group "users" has read/execute.
    (In OMV, this permission is not typical. By default, the "users" group gets read/write/execute.)
    ** This particular permission setting, as shown, is useful for making media files available to LAN users, but it prevents them from adding or deleting files.)
    - The "Others" entry is, literally, everyone else who is NOT the owner or a member of the Group specified in the Group entry.
    (By default, this is usually "read/execute".)
    - Finally, note the "urbackup" system user and the "urbackup" group. If the urbackup user is added as a member of OMV's "users" Group, in the following, urbackup would have "read/execute" access to OldCDArchives (which would be enough access for the program to back the folder up).



    In your case, if you put the TVHead system user in your users group, and your users group has Read/Write/Execute access to the folder in question, it should work. (Again, it would be best to consult with the TVHead web site to understand the app's requirements.)


    And while it's your call, giving "Others" Read/Write/Execute, is not the best security practice. However, it's done quite a bit to get past the issue(s) we're discussing here and now.

Participate now!

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