Execute Permissions and an Odd Experience

Martin McCormick martin at dc.cis.okstate.edu
Tue Apr 12 15:17:28 UTC 2011


I have been working in Unix for 19 or 20 years and sometimes, I
still run in to something that I don't quite understand.

	Last night, I mounted a USB stick formatted with FAT32
and discovered that I could not execute executable files on the
thumb drive which was mounted on /mnt. As soon as I copied the
files to /root/, they all ran as expected.

	The executable files were a pair of bash shell scripts
and the error for each one was 

/bin/bash: bad interpreter

followed by "permission denied" since /bin/bash didn't run.

	I tried this on a ubuntu Live CD to capture some data
from a system whose sound wasn't live after booting and then a
Debian system which was working fine so I could compare its
behavior to the booted Live CD. Both behaved identically.

	Did the scripts not run because of the FAT32 file
system? I believe I remember looking at /mnt and the x bits were
set. They were also set on the scripts.

	What happened?

	I have noticed in the past that when you mount foreign
file systems, naming rules change to the rules of the FS being
mounted. I guess I hadn't tried to execute anything directly
from a file on a FAT32 file system. Had it been ext3 or ext2, I
imagine it would have run normally.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group




More information about the ubuntu-users mailing list