GNOME Bugzilla – Bug 679187
Nautilus prompts to execute plain text files on sshfs mounts
Last modified: 2012-09-13 11:23:14 UTC
Steps to reproduce: mkdir /tmp/etc sshfs localhost:/etc /tmp/etc nautilus /tmp/etc => double click on e.g. "login.defs" Nautilus prompts: Do you want to run "login.defs", or display its contents? "login.defs" is an executable text file. [Run in Terminal] [Display] [Cancel] [Run] Of course the "login.defs" permissions are fine in the file system and in the sshfs mount, it's not executable.
*** This bug has been marked as a duplicate of bug 601736 ***
@William Jon McCann: I don't think it's a duplicate of #601736, it's a completely different problem. $ ls -lha /tmp/etc/login.defs -rw-r--r-- 1 root root 11K Ιούν 24 2011 /tmp/etc/login.defs As you can see (and as I mention on the original bug description), login.defs is not executable. The patch in http://bugzilla-attachments.gnome.org/attachment.cgi?id=221183 changes the default action to "display", but I don't think that resolves this issue, as a user may change her settings to "execute". And since login.defs is _not_ executable, it shouldn't be executed. The "executable-text-activation" setting shouldn't apply to non-executable files. I'm marking the bug as "incomplete", as I don't see (don't have access to?) any other more appropriate status.
Created attachment 221681 [details] gvfs-info on file
This looks to me like a bug in sshfs. Strace shows the following calls: access("/tmp/etc/login.defs", R_OK) = 0 access("/tmp/etc/login.defs", W_OK) = 0 access("/tmp/etc/login.defs", X_OK) = 0 Compare that to /etc/login.defs: access("/etc/login.defs", R_OK) = 0 access("/etc/login.defs", W_OK) = -1 EACCES (Permission denied) access("/etc/login.defs", X_OK) = -1 EACCES (Permission denied) Using sshfs-fuse-2.4, fuse-2.8.6 and glibc-2.15 here.
Thank you, I reported it upstream at the sshfs mailing list: http://sourceforge.net/mailarchive/forum.php?thread_name=504C7578.5010400%40gmail.com&forum_name=fuse-sshfs
Update for proposed patch: http://sourceforge.net/mailarchive/forum.php?thread_name=87y5keushb.fsf%40tucsk.pomaz.szeredi.hu&forum_name=fuse-sshfs I think this can now be closed as it's not gnome-related.