Want Public Folder READ ONLY for Guests Read/Write for Users

  • Found a really good explanation... For Version 1.0...

    No matter what combination I use I can not get what I want.


    My Users Group I trust to add files and edit stuff in the public folder.

    But, not everyone in the family or Guests can be trusted to do so.

    But, I would like them to be able to play something from the Media Folder, example.

    How do I give Guests READ-ONLY while still retaining Read/Write for my Users?


    Perhaps this thread Samba Share Types in OMV should be updated?

  • It seems you didn't see the links to documentation in OMV Web UI.

    Tthere is a complete & updated manual on https://openmediavault.readthe…ss_rights_management.html

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Offizieller Beitrag

    My Users Group I trust to add files and edit stuff in the public folder.

    But, not everyone in the family or Guests can be trusted to do so.


    If we're talking about a Samba share (SMB) accessible on your network, there are two ways to do what you want:

    You have a shared folder with permissions. Note that Samba (SMB) CAN NOT override file folder permissions to allow more access. Samba can further restrict, but it can not override, granting a permission that does not exist in the following.

    Shared Folder permissions for a Music Share:
    In the following, the users group can edit the share. (This is any user added to the server.) They can add files, delete, etc.
    "Others" which is the equivalent of an SMB "Guest" has read only.
     


    ________________________________________________________________________________________________________

    If you have "Others" (or the SMB equivalent of "Guests") set to Read/Write/Execute, in essence, everyone would have write access) The following will still provide the protection you're looking for.

    As I said before, Samba can restrict further but can not override. In the following, the Samba share (which is layered onto the shared folder) is set to read only. Read only applies to all.





    Now, for the final note:
    Even with write access at the Shared folder level, you can set the top level SMB share as "Read Only". When Samba is set to "read only", the following statement in extra options will allow members of the users group to "write" anyway. It's called a "write list". It can be done for a single user as well, in this form -> write list = username
    In this way, an exception for a group or a user can be made to the Global "read only" setting above.



    So here are the minimum settings for what you want:
    Shared Folder:

    users must have Read/Write
    others must have Read


    SMB share
    Public: Guests allowed


    The above would be enough.
    _________________________________________________

    (Setting Read Only in the SMB share, then overriding "read only" for your users group only with a write list, would only be necessary "if" your shared folder has "others" with full permissions of Read/Write. This particular SMB setting would prevent guests from writing to the share.)
    _________________________________________________

    **A more inclusive document regarding shared folder permissions and SMB shares can be found -> here .**

    • Offizieller Beitrag

    Honest IO will take a Linux course as soon as possible...


    For now I quit

    Oh no! Don’t quit for now. This IS your Linux course. Besides, most of your questions have to do with settings in the OMV GUI. Look at what a great explanation you got from crashtest above, which will benefit others who read this thread. The little tidbit about using write list=@users in the extra options of your SMB settings was something that I didn’t know. The explanation of the relationship between shares permissions and SMB permissions is a little nugget of gold, not found anywhere in the complete & updated manual. There is so much to learn from the ongoing threads in this forum. Never quit.


    Sometimes Google is your friend, but not always. My biggest problem with Google is sometimes I can’t figure out how to phrase a search in order to get the desired search results. In this age of lockdown and masks it’s refreshing to interact with a real person.

    • Offizieller Beitrag

    OMG! Nearly 2 weeks of research, and finally I found an answer to my issue! Thank you so much crashtest

    If you need more help, I wrote a document that might be useful, -> here.

  • I'm hopelessly lost for the same reason as the OP. I can open/read/write to any directory/file that I have backed up from my laptop to OMV on a RPi 4.


    I use FreeFileSync to make weekly backups without any issue, regardless of file type, from my OMV/RPi system.


    I can even manually copy/delete ANY directory/file without issue.


    However, the ONLY file I need to write to, from just 2 laptops, is a SQLite db file, fails. I can delete the entire file but not write to it. Reading works fine.


    I can take this same SQLite file, copy it to a ThumbDrive and without any issue I can read/write/delete.


    I've even placed a ThumbDrive on an old RPi 3 and can copy/delete/read/write this SQLite file. Very slow compared to the OMV/RPi.


    I'm in a hopeless loop where if I set read/write permissions to a folder via OMV, when I attempt to open that folder from my Linux Mint 19.3 laptop I cannot not get past the log in dialog box even though I've made sure I have entered the correct name [my laptop's name to minimize what I have to remember} and the same PW I use to log into my laptop.


    Only if I remove the R/W check mark from the "permissions" in OMV can I gain access from my laptop.


    Any attempts to use CHMOD or CHOWN via the Command Line and all Failed to execute.


    Using " ls -l " this is the permissions shown via the terminal on my laptop.

    -rwx------ 1 xxxx-xxxx-linux xxxx-xxxx-linux 65536 Aug 28 09:03 CB.sqlite


    Programming an 8 core CPU in Assembly for true multi-tasking, was easier and more successful than this. OMV seems fantastic on all levels, but obviously this is beyond my comprehension.

    • Offizieller Beitrag

    First, I'd recommend creating a new thread for this issue, to get the attention of people experienced with SQL. This question is out of the scope of Linux file permissions. SQL DB permissions, users, DB backup, etc., are different topics altogether.


    In the new thread, you might want to mention "where" the SQLite server process is running. (Is it on OMV or on a Laptop Client?) What your SQL server is doing would be useful information as well (the back end for what?).
    ______________________________________________________________

    While I'm not an SQL expert:
    SQL files (actually databases) are created by the SQL server process. The server expects to maintain exclusive control of the DB file while the server is running. Usually, when the server is active, it holds its DB files in a continually open state. You can do a simple file copy of the DB file but there's a chance that the copy may be corrupted, if the server writes to the DB while you're backing it up. To do a proper DB backup, the server should be commanded to quiet down - to not write to the DB during the backup. While it may be possible to run a command line or script a "stop the server" or a "detach database" command, Free File Sync does not appear to be capable of doing that by default.

Jetzt mitmachen!

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