I’m using the Finder’s built-in Connect to Server... feature and use it for connecting to a read/write WebDAV server. Everything is working except executing files hosted on the server. I tried mounting the server using the mount_webdav Terminal command, and got the same result as using the Finder. Running ls -laF /Volumes/webdav results in:

drwx------  1 myname  staff    2048 Mar 15 14:09 ./
drwxrwxrwt  4 root    admin     170 Mar 15 09:25 ../
-rwx------  ...
drwx------  ...
-rwx------  ...
drwx------  ...

Which makes me assume that files should be executable. However, executing a bash script from the server in Terminal results in:

bash: /Volumes/webdav/test.sh: /bin/bash: bad interpreter: Permission denied

I just want to be able to execute these files without having to move them to a physical disk. What am I overlooking?

EDIT: per request of @patrix, here are the commands i used:

mkdir /Volumes/webdav
mount_webdav -i -s https://example.com/program/ /Volumes/webdav/
chmod +x /Volumes/webdav/test.sh
head /Volumes/webdav/test.sh

and the output was:

Username: ‹username›
# head
mkdir /tmp/tex
cd /tmp/tex
cp -RX /Volumes/webdav/tex/* .
xelatex report.tex
open report.pdf
# exec
bash: /Volumes/webdav/test.sh: /bin/bash: bad interpreter: Permission denied
  • Can you run head /Volumes/webdav/test.sh and mount, then add the output of both to the question? – nohillside Mar 15 '15 at 15:04
  • OP updated! The bash script works as intended when I copy it to the system disk. The issue has to be related to the server volume. – user118108 Mar 15 '15 at 20:31
  • 1
    Can you just run mount without any options and include the output as well? The volume could be mounted with a "noexec" option set. – nohillside Mar 16 '15 at 6:47
  • I have the same problem, and yes, the volume is mounted noexec. Is there any way to prevent that? – Emil Styrke Aug 25 '16 at 10:11

You must log in to answer this question.