cannot execute programs/scripts from USB drives (including reiserfs and ext)

Bug #108214 reported by David Lichterman
22
Affects Status Importance Assigned to Milestone
kubuntu-meta (Ubuntu)
Invalid
Undecided
Unassigned
pmount (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: kubuntu-desktop

1) mount a USB drive that contains an executable script or binary (this includes any reiserfs or ext filesystem)
2) attempt to run/execute that script or binary program
3) cry

It seems that USB drives are not mounted with execute permissions. This may be intentional, but it's definitely not the expected behavior and seems to have some very undesirable consequences as myself and many on the #kubuntu channel have come across this issue and spent a few hours trying to figure out the cause.

I asked if anyone in #ubuntu was having the same issue and I got no response, so I assume it's just a kubuntu issue.

Tags: execute mount usb
Revision history for this message
Spencer (som0749) wrote :

I'm having the same issue do you know of a fix?

Revision history for this message
Carlos Diener / emonkey (emonkey) wrote :

I can confirm that. Since a while (maybe feisty) I can't run bash script on my external USB Harddrive.

Revision history for this message
Phillip Calvin (phillipc) wrote :

This is the opposite bug to #60722. Since USB drives that must interface with Windows are formatted with FAT, they lose all permission data, including the executable permission. Hence, when a FAT drive is mounted, either all the files must be marked as executable, or none. If they are all marked as executable, Nautilus will ask the user whether to "Open" or "Execute" the file when double-clicked, which is irritating and confusing for new users.

I understand that this may not be an issue in KDE, but whatever change is made will affect both desktops.

As I see it, it makes more sense to leave everything marked as non-executable and risk annoying advanced users (presumably, you can execute it using sh from the command line) rather than confusing new users.

Revision history for this message
Spencer (som0749) wrote :

I don't know about FAT drives but I see no reason ext3 formated drives shouldn't have the execute bit work correctly which currently it doesn't.

Revision history for this message
David Lichterman (lavid) wrote : Re: [Bug 108214] Re: cannot execute programs/scripts from USB drives

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nor does reiserfs start as executable. I also understand the vfat issue,
and I agree. But ext2/3/4, xfs, reiserfs 3/4 should be executable IMHO.

- -Dave

Spencer wrote:
> I don't know about FAT drives but I see no reason ext3 formated drives
> shouldn't have the execute bit work correctly which currently it
> doesn't.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGX2mEwapA6Qc539wRAqfDAJ90uf7rTG9Pz8o2rB/J20T8lbsb+QCeN4JK
RTfnSmLQfqXVAvpfZCi9VHc=
=yUC+
-----END PGP SIGNATURE-----

Revision history for this message
Phillip Calvin (phillipc) wrote : Re: cannot execute programs/scripts from USB drives

I agree -- filesystems that support the execute bit should work, which is a bug. I did not realize you were talking about non-FAT drives... perhaps you could add reiserfs or ext to the bug description so this is clearer?

David Lichterman (lavid)
description: updated
Revision history for this message
Rich Johnson (nixternal) wrote :

Closing kubuntu-meta, this isn't a kubuntu-meta issue. I have multiple ext3 usb sticks and my 500gb drive is external usb that I can execute and do whatever from, so I cannot confirm, however I will confirm due to the responses, I just need to find out what would be the problem behind this.

Changed in kubuntu-meta:
status: Unconfirmed → Rejected
Revision history for this message
Rich Johnson (nixternal) wrote :

I am assigning this to pmount as the issues everyone here is reporting seems to be with external/usb devices in which pmount wraps around the standard mount app for devices without matchind /etc/fstab entries.

I apologize if this is the incorrect package, but the *-meta packages I felt were incorrect as I am able to do what they are saying they can't w/o any issues.

Changed in ubuntu-meta:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Vincent Fourmond (fourmond) wrote :

I dont know how you are mounting exactly your drives, but if you use pmount directly, you might be interested in the -e option, that does exactly this, such as in, say,

pmount -e /dev/sda1 my_nice_drive_label

I don't know if that would be a good idea to systematically change the default behaviour.

Revision history for this message
kreig jones (kreigjones) wrote :

The -e option along with -fmask 055 worked. Although every file is mounted as executable.
pmount by default was using file_umask=0111.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.