Why drives are mounted with noexec option

  • Hi all,


    I have a question : Why drives are mounted with noexec option ?


    Because i would like to run script or executable binaries from mounted drive.


    is there a option somewhere ?


    best regard

    • Offizieller Beitrag

    They always have been. Most data does not need to be executed.


    Set the environment variable OMV_FSTAB_MNTOPS_EXT4 in /etc/default/openmediavault to your preferred values.
    Defaults: defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0


    Of if the partition is already mounted, find it in /etc/openmediavault/config.xml in the fstab section.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks


    I found a dirty way : umount drive, del noexec from /etc/fstab, mount drive

    I am trying to build debian pakage on drive mounted with a lot of script and binaries and i don't understand why i had Permission denied ... ;( I know now


    For security reason data does not need to be executed ;)

  • The changes made by your 'dirty way' can be reset and overwritten by OMV when performing certain other operations. Changing the environment variable will be persistent.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    That is why the developer plugin copies the files to /tmp/ to build the package :)

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Set the environment variable OMV_FSTAB_MNTOPS_EXT4 in /etc/default/openmediavault to your preferred values.


    Is OMV_FSTAB_MNTOPS_EXT4 a valid variable in OMV 2.x or is it new for OMV 3?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    OMV_FSTAB_MNTOPS_EXT4 is valid for OMV 2.x and 3.x. It is in the default file at installation time in OMV 2.x. In OMV 3.x, it has to be added to change the defaults.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I am running OMV 2.2.5. I set the following in /etc/default/openmediavault (it was not there, I had to add it)


    OMV_FSTAB_MNTOPS_EXT4="defaults,nofail,user_xattr,exec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0"


    Then as root I ran /usr/sbin/omv-mkconf fstab


    When I examine /etc/fstab, the drives in the # >>> [openmediavault] section still show noexec.


    Rebooting makes no difference.


    What am I missing? :)


    I don't see this variable in the list here: http://wiki.openmediavault.org…Environment_Variables/all but maybe that list is not up to date.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Maybe it was in there from OMV 1.x and I upgraded.


    You don't need to add exec. Just remove noexec.


    Running omv-mkconf fstab updates /etc/fstab from the info in the fstab section of /etc/openmediavault/config.xml. Changing the defaults only affects newly created filesystems. If you want to change an existing filesystem, you need to edit /etc/openmediavault/config.xml (make a backup first). Then execute omv-mkconf fstab and remount/reboot.


    The defaults for the filesystems can be found here

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • ma man.. this was pretty useful to me today. *ryphractor takes a bow at ryecoaaron* thank you :D

  • is the solution still up to date? or has something changed with omv 5.x?


    i changed the file but:

    Code
    root@openmediavault:~# omv-mkconf fstab
    -bash: omv-mkconf: command not found

    i only have

    Code
    root@openmediavault:~# omv-
    omv-aptclean          omv-engined           omv-initdb            omv-jsminify          omv-mkraid            omv-po2json           omv-rmraid            omv-salt              omv-sysinfo
    omv-changebackports   omv-firstaid          omv-installdocker     omv-mkaptidx          omv-mkrrdgraph        omv-removekernels     omv-rpc               omv-showkey           omv-update
    omv-confdbadm         omv-grubiso           omv-installproxmox    omv-mki18ndict        omv-mkwebjs           omv-resetperms        omv-run               omv-showsharedfolder

    I don't want to go wrong or "try it out"

  • It changed for OMV 5. Run this command as root:


    Code
    omv-salt deploy run fstab

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

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