Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This does not work:

$ touch testfile
$ chmod 777 testfile
$ ls -l testfile
-rwxrwxrwx 1 quinn dialout 0 Apr 18 10:15 testfile
$ ./testfile
-bash: ./testfile: Permission denied
$ sudo ./testfile
sudo: unable to execute ./testfile: Permission denied

I am mounting via this line in my fstab:

sshfs#127.0.0.1:/remote-dir /data/local-dir fuse port=2222,user,uid=1000,allow_other 0 0

note: I am connecting to localhost over port 2222 because I am using a tunnel.

share|improve this question
    
I updated the example to address your question. –  quinn Apr 18 at 15:17

1 Answer 1

up vote 1 down vote accepted

You need to add the exec option to your fstab line.

From the ArchWiki page for fstab:

exec - Allow execution of binaries on the filesystem.
...
user - Allow any user to mount the filesystem.
       This automatically implies noexec, nosuid, nodev, unless overridden.

So you have user, but user implies noexec, so you need to add exec to negate that.

share|improve this answer
    
My line is myuser@mydomain:/home/myuser /home/myotheruser/mymountpoint fuse.sshfs users,_netdev,reconnect,uid=myotheruser,gid=myotheruser,idmap=user,allow_other,e‌​xec 0 0 where myuser is a remote host user and myotheruser is local client user. –  Hypershadsy Sep 3 at 0:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.