Could not able to run the executable from the USB flash drive only in Ubuntu 10.10

Bug #663815 reported by Senthil Kumar_Webrsk
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
udisks (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

All the steps tried under root login.
I was trying to run a executable file from a USB flash drive on ubuntu 10.10. Its works fine if i run the same file from the hard drive or the same USB drive executable works fine in Ubuntu 10.04.
The file is already set to 777 permission but when opening in ubuntu 10.10 it only shows read+write permission. Chmod 777 not works though.

For testing :
I created a file in the hard disk ( / ) and set the (chmod +x -R) permission which is applied but after i copied the file to the USB drive the permission changed to -rw-r--r-- instead of -rwxr-xr-x .

I searched release notes of 10.10 but it doesn't have information about this.

Tags: patch maverick
Revision history for this message
David (hamassala-dicko) wrote :

Exact same problem here.

Revision history for this message
Philip Muškovac (yofel) wrote :

Can you please tell us what file extension the executable you used had and while filesystem is on you usb drive? There was a change in the default mount options for vfat that restricts executable permissions to windows executable files for the windows FAT file system a while ago:

udisks (1.0.1-2) unstable; urgency=low

  * Add 00git-vfat-showexec.patch: Enable the "showexec" vfat mount option, to
    avoid data files being executable (which causes confusing question dialogs
    in nautilus which only have one sensible answer). Patch taken from
    upstream git head. (LP: #14335)

Changed in ubuntu:
status: New → Incomplete
tags: added: maverick
Revision history for this message
Ron Young (rly1) wrote :

You asked for some more details regarding the filenames on the thumb drive...I have a directory on
my thumbdrive that has multiple executable files on it that runs a tcl (starkit) file with my passwords
in it. (output is from ubuntu 9.10). Ubuntu 9.10 mounts the thumbdrive as /media/HP 125W/. On Linux
I use the command: "tclkit-linux-x86 gorilla-1.4.kit" to run the program.

ron@ron-laptop:/media/HP v125w/PASSWORDS$ ls -l
total 6152
-rwxr-xr-x 1 ron ron 251221 2009-11-06 10:36 gorilla-1.4.kit
-rwxr-xr-x 1 ron ron 14840 2010-10-06 13:15 passwords.psafe3
-rwxr-xr-x 1 ron ron 1328 2009-11-06 10:45 README.txt
-rwxr-xr-x 1 ron ron 1684708 2010-02-27 18:10 tclkit-freebsd7-x86
-rwxr-xr-x 1 ron ron 1747467 2010-02-23 11:34 tclkit-linux-x86
-rwxr-xr-x 1 ron ron 962887 2010-02-24 13:30 tclkit-win32.exe
-rwxr-xr-x 1 ron ron 1609728 2008-08-29 17:07 V-Safe100.exe
ron@ron-laptop:/media/HP v125w/PASSWORDS$

Revision history for this message
Ron Young (rly1) wrote :

I forgot to add the mount information:

/dev/sdb1 on /media/HP v125w type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)

Revision history for this message
Philip Muškovac (yofel) wrote :

Right, the file has no .exe .bat or .com extension and is thus not marked as executable since lucid. I'm assigning this to udisks where this option is set. I'm not sure if something can be done about this though since the change is intentional.

affects: ubuntu → udisks (Ubuntu)
Changed in udisks (Ubuntu):
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Philip Muškovac (yofel) wrote :

Correction: that should be 'since maverick' not lucid.

Revision history for this message
W Karaki (wafaa-karaki) wrote :

I have this problem too. I have a fat32 and another vfat mount with .exe files and other executable files was trying to install under wine. I could install it fine under 10.04 and 9.10, but since installing 10.10, I can't install them from the usb anymore. I tried changing permissions but couldn't, the check appears for a second, then disappears again.
The same applies to CDs and DVDs with all kinds of executable files (.exe, .bat, shell scripts, txt, etc), and I can't change permissions neither from file properties nor using chmod 777. I actually can't seem to install anything at all unless it happens to be in my linux partition. The result being that every time I want to install a DVD, I'm having to copy 3-4 GB to a folder in my home folder, do a chmod 777 to it, install it and then delete it.
I'm going to remove 10.10 and going back to 10.04 because I've already wasted several hours over this :(
Is there anyway to revert nautilus back to the way it was before without reinstalling the whole OS?

Revision history for this message
Philip Muškovac (yofel) wrote :

@W Karaki: The only way to resolve this currently would be to downgrade udisks to the lucid version. Also, .exe, .bat and .com files are still executable as long as you use FAT.

The CD-ROM issue is bug 561479

Revision history for this message
Lars Karlsson (mintlars) wrote :

This is a terribly stupid change if you, like me, want to have a platform independent, portable, encrypted drive using Truecrypt. If you can't run the Truecrypt binary from the drive, you'll have to install it on the system, which severely affects the portability aspect. Not very thought through change this one.

Revision history for this message
Christophe Van Reusel (christophevr) wrote :

Now I'm using ubuntu Natty. Currently natty uses udisks 1.0.2-4ubuntu2 . A very big problem for me is that script files and binaries
 are not executable on a vfat usb stick. Ok for some it's a big problem that all files are mounted with -x option on a vfat drive i know. But for a big majority it's the other way around. The standard behaviour should be -x everywhere on vfat or ntfs as this option can only be give during mount operations. The stick is used on mac,windows and linux. does contain highly sensitif information and for that reason execution can only be done from stick self. For mac no problem as they are using the logic option to mount vfat always with -x . As now since long ubuntu does NOT provide a mean to have a usb stick automounted with exec option for vfat usb sticks. I'm forced to recompile the udisks1.0.2 . After al it's only the udisks-deamon which needs to be changed.

And yes We can do things via fstab but for usb devices this is really not a option we are speaking about portability MULTI system devices (that's why they can't be formated in ext2,3,4,hfs or hfs+ ) .
Before ubuntu just had a system setting so that users easely could change there preferences trough gconf-editor. This is gone now.

I now tried to compile the udisks 1.0.2-4ubuntu2. using the 3 source files. udisks_1.0.2.orig.tar.gz,udisks_1.0.2-4ubuntu2.debian.tar.gz, udisks_1.0.2-4ubuntu2.dsc

From natty self. unpacked using dpkg-source -x udisks_1.0.2-4ubuntu2.dsc . So the specific ubuntu patches where applied.
Then modified the device.c by adding the exec option to vfat .
Then used ./configure followed by make. (did not used install) Then I just copied the udisks-deamon to /usr/lib (replaced the original) Now It does mount vfat with exec, but when unmounting, the mount point into /media is not erased any more.

How to compile to have this udisk-deamon the same like the original one with just my vfat change ?

I gues it's an option when runnig ./configure but I'm already searching for almost a week and can not find any info.

Note the original udisk-deamon is +- 234 kb the compiled by me 930 kb so there is a difference.

Perhaps since this with or whitout exec is such a severe problem and for one user it needs to be whitout for the other user with. In both cases arguments are 100 % valid. neighter is wrong or right or both are wrong and right. -:) Should basic ubuntu better provide two basic packages of udisk. One with exec mount enabled and one with exec disabled. So user can install that what they need with synaptic. And the problem is solved .

Revision history for this message
Jyrki Hämäläinen (jyka) wrote :

Popped into this while making traveler disk type of truecrypted USB stick usable in windows+linux.

The biggest problem for me is the broken support for autorun.sh in linux environment, truecrypt binaries can be renamed as truecrypt-linux-i386.exe easily enough. Renaming autorun.sh to autorun.bat would mean possible challenges on windows side.

I started to think the tradeoff between running shell scripts and filtering and possible solutions...

Would it be a good enough compromise, if the fat-driver would accept the list of extensions that should be given the executable bit to? Then udisks-daemon could pass extensions .exe, .bat, .com and .sh as mount-options.

If some desktop wants to override the default it would be still possible.

These changes needed for this are pretty staightforward (functionality in kernel/fat+udisks, mount documentation in util-linux if I did not miss something), I actually tested it out already in oneiric and could provide patches (to ubuntu, upstream or both) if this would be something that could be accepted.

Revision history for this message
Jyrki Hämäläinen (jyka) wrote :
Revision history for this message
Jyrki Hämäläinen (jyka) wrote :
Revision history for this message
Jyrki Hämäläinen (jyka) wrote :

Since I need this functionality in multiple machines, I decided to learn to make ppa packages ;)

Patched kernel & udisks for Oneiric & Precise can be found in ppa:jyka/usbexec.

Related patches in jyka-udisks-add-vfat-exe-extensions.patch & jyka-kernel-add-vfat-exe-extensions.patch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "jyka-kernel-add-vfat-exe-extensions.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Jochen Fahrner (jofa) wrote :

I think a good solution would be to add .sh extension to the list of allowed executables for the showexec mount option.

Revision history for this message
YAFU (yafu) wrote :

Yes, "showexec" can not allows change attributes of files and make them executable.
I find no sense in Linux that device is mounted with "showexec"
http://www.tomas-m.com/blog/19318-Bootinst-script-improvements.html

Still happening in Kubuntu 12.04 and 12.10

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

Other bug subscribers

Remote bug watches

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