Help on bash script

  • I don't know if is offtopic :?:


    I was testing a bash script, I want to obtain this:
    -change directory (let's say /home/user1/program1/)
    -execute a program in /home/user1/program1/
    ./home/user1/program1/program.exe


    Bash
    #!/bin/bash
    cd /home/user1/program1/
    ./home/user1/program1/program.exe


    Bash
    #!/bin/bash
    cd /home/user1/program1/
    ./program.exe


    Neither of the two scripts works... Any help is appreciated! Thanks in advance

    • Offizieller Beitrag


    Filesystems mounted via OMV WebGUI can not execute applications: The 'noexec' mount option is set in /etc/fstab. You have to modify OMV_FSTAB_MNTOPS_(EXT3|EXT4|XFS|JFS) in /etc/default/openmediavault and execute


    # omv-mkconf fstab
    # mount -a


    If you want to remove the 'noexec' mount option.

  • Sry volker, but as far as I can see is he trying to start a program on the system drive, which is executable. Not the data drive. ;)


    So you only need to make the program executable with -for example-

    Code
    chmod +x program.sh

Jetzt mitmachen!

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