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

Asked by Senthil Kumar_Webrsk

All the steps tried under root login.
I was trying to run a executable file from a USB flash drive on ubuntu 10.10. The same file works well until 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.

I searched release notes of 10.10 but it doesn't have information about this. Not sure this is a bug or security restrictions!!

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dmitry Shachnev (mitya57) said :
#1

What filesystem do you use on your flash? If it is FAT, maybe the program you run does not have permssion to read. Try to copy it to your hard drive and then run.
Also, how did you change rights? Try to run "chmod +x -R /media/YOUR_FLASH_DRIVE/"

Revision history for this message
Senthil Kumar_Webrsk (webrsk-ideas) said :
#2

Its FAT filesystem. Its works fine if i run the file from the hard drive or the same USB drive executable works fine in Ubuntu 10.04.
I ran the command as mentioned : chmod +x -R /media/exefile -> The permission is not changing to any of the files which is in the USB.
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 .

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What executable is it? Is it a *NIX binary or some windows executable?

Revision history for this message
Senthil Kumar_Webrsk (webrsk-ideas) said :
#4

Its a python script which is executable. Created in linux environment.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

then try:

py /path/to/script

and it should run ok

Revision history for this message
Senthil Kumar_Webrsk (webrsk-ideas) said :
#6

Thanks for your response actionparsnip.
But the source python script has been converted as Unix binary which is executable. The problem is the file permission not changing to executable mode , so it not allows to execute the file. Tried "chmod 777 filename" but its not getting applied.

To reproduce the case:
Just copy any executable file(Any file which has 777 permission) to the USB pen drive and you can find that the executable permission has automatically changes to Read+write mode of the destination file.

Revision history for this message
mac9416 (mac9416) said :
#7

A little context might be helpful: the executable is that of a portable application meant to be run from a flash drive. So, though running the executable from the command line would probably work, that's more than the fabled Average User is likely to know how to do.

Revision history for this message
Senthil Kumar_Webrsk (webrsk-ideas) said :
#8

Guess ubuntu 10.10 auto mounting not allows to change the file/folder permissions or execute the file from the usb drive .

It can be fixed manually by mounting the usb drive as mentioned below.

#1
Create a folder in /media to mount the usb data: > mkdir usb

#2
Identify the USB device which is connected : > fdisk -l
Which shows the usb device like: /dev/sdc1

#3
Now add an entry in /etc/fstab :
/dev/sdc1 /media/usb vfat umask=0222,auto,users,exec 0 0

#4
Save and quit.

#5
> mount /media/usb

Check your files in /media/usb which has executable permission and you can change the permission as wish.

> unmount /media/usb

Still waiting to know the right answer , is it ubuntu 10.10 release doesnt mount USB drive with executable permission due to security restriction or is it a bug !!!

Can you help with this problem?

Provide an answer of your own, or ask Senthil Kumar_Webrsk for more information if necessary.

To post a message you must log in.