Monday, July 9, 2012

Permission Denied when excuting a script on OpenMediaVault

Couldn't execute my AV scan script for my downloaded files:

root@omv:/media/data/usenet/scripts# ./av_scan.sh
-bash: ./av_scan.sh: Permission denied
root@omv:/media/data/usenet/scripts# ls -lah av_scan.sh
-rwxr-xr-x 1 root root 71 Jul  9 23:20 av_scan.sh

Fought with it for a couple of hours on and off before I realised what might be going on:

 # mount
<snip>
/dev/mapper/data_vg-data_lv on /media/fa12c9af-de6a-4068-b55f-71d798ee8b6b type xfs (rw,noexec,usrquota,grpquota)


The OpenMediaVault developer made a decision that nothing on the "data" filesystem should be allowed to be executed.  I understand why it might be best for it to be that way, so I relocated the scripts to a directory on another filesystem, and everything works as it should.

No comments:

Post a Comment