Improvement: Make unmounted /srv folders not writable by default

    • OMV 4.x

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

    • Improvement: Make unmounted /srv folders not writable by default

      Idea: I think it would make sense to protect the mount folders generated by omv at /srv against write access.
      Background: I have scripts and rsnapshot running at night. In rare cases, disks were not mounted. Data was written to root partition instead
      Solution: I can manually protect the folders (when unmounted) with chattr +i /mountpoint. They are not intended to be anything but mountpoints anyway.
      (see: serverfault.com/questions/5702…ted-mount-point-directory)

      I think it would be a good feature for omv to do this on its own upon creating the mountpoints. What do the devs think?
    • That's not necessary because rsync and usbbackup scripts already ensure that the target directory is mounted.

      github.com/openmediavault/open…iavault/mkconf/rsync#L113
      github.com/openmediavault/open…ault/mkconf/usbbackup#L73
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Paul. wrote:

      Thanks for your reply, Volker.
      The rsnapshot plugin from omv-extras did not check though...

      Are there any downsides in making the folder immutable with chattr? It might be an additional way to protect root drive from third party plugins and custom scripts.
      Yes, it's complicated, erroneous and there are other ways to fix that (OMV core plugins already did that). If you have an elegant idea, please feel free to open a pull request.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit