Problem Executing from USB Drive

Mike McCarty mike.mccarty at sbcglobal.net
Thu Jun 30 19:27:12 UTC 2005


I'm having problems executing programs from a mounted USB drive.

$ grep /dev/sda1 /etc/fstab
/dev/sda1               /mnt/usb                auto    noauto,user 0 0

$ ls -ld /dev
drwxr-xr-x  23 root root 155648 Jun 28 15:36 /dev

$ ls -ld /dev/sda1
brw-rw----  1 root disk 8, 1 Feb 23  2004 /dev/sda1

$ ls -ld /mnt
drwxr-xr-x  12 root root 4096 Jun 29 15:34 /mnt

$ ls -ld /mnt/usb
drwxr-xr-x  5 root root 4096 Jun 23 15:04 /mnt/usb

$ ls -ld /mnt/usb/jmccarty
drwx------  14 jmccarty jmccarty 4096 Jun 28 08:44 /mnt/usb/jmccarty

$ ls -l /mnt/usb/jmccarty/hello
-rwxr-xr-x  1 jmccarty jmccarty 4731 Jun 23 15:03 /mnt/usb/jmccarty/hello

$ /mnt/usb/jmccarty/hello
bash: /mnt/usb/jmccarty/hello: Permission denied

$ uname -a
Linux Presario-1 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 
i686 i386 GNU/Linux

$ whoami
jmccarty

$ cp -p /mnt/usb/jmccarty/hello .

$ ls -ld .
drwxr-x---  48 jmccarty jmccarty 4096 Jun 30 14:20 .

$ ls -l hello
-rwxr-xr-x  1 jmccarty jmccarty 4731 Jun 23 15:03 hello

$ ./hello
Hello

So why is permission denied? It's not just that it's removable
medium. So is the floppy, but I can execute from there.

Mike

-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the users mailing list