After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679187 - Nautilus prompts to execute plain text files on sshfs mounts
Nautilus prompts to execute plain text files on sshfs mounts
Status: RESOLVED NOTGNOME
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Tomas Bzatek
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-06-30 11:35 UTC by Alkis Georgopoulos
Modified: 2012-09-13 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gvfs-info on file (1.11 KB, text/plain)
2012-08-17 23:46 UTC, William Jon McCann
Details

Description Alkis Georgopoulos 2012-06-30 11:35:19 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.
Comment 1 William Jon McCann 2012-08-17 22:42:45 UTC

*** This bug has been marked as a duplicate of bug 601736 ***
Comment 2 Alkis Georgopoulos 2012-08-17 23:17:28 UTC
@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.
Comment 3 William Jon McCann 2012-08-17 23:46:20 UTC
Created attachment 221681 [details]
gvfs-info on file
Comment 4 Tomas Bzatek 2012-09-07 12:21:20 UTC
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.
Comment 5 Alkis Georgopoulos 2012-09-09 10:57:30 UTC
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
Comment 6 Alkis Georgopoulos 2012-09-13 11:23:14 UTC
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.