View Full Version : permission problems.

28th March 2006, 12:43 PM
i have a FAT32 partition to which i save all my documents when workin in linux or windows. I can comfortably write and read from the partition, i even can play music files stored there...the problem arises when i do some programming, i can create a source file and even manage to compile but alas! execution is denied even as su.

[brethrap ch12]$ gcc conf.c -o conf
[brethrap ch12]$ ./conf
bash: ./conf: Permission denied

i checked the permissions on the partition and,

[brethrap ch12]$ ls -l /mnt/hard-drive/
total 48
drwxrwxrwx 8 root root 16384 Mar 22 11:10 Documents and Settings
drwxrwxrwx 2 root root 16384 Mar 18 15:35 Recycled
drwxrwxrwx 3 root root 16384 Mar 18 11:30 System Volume Information

i checked my fstab for the umask details,

/dev/sda5 /mnt/hard-drive vfat users,rw,owner,umask=000 0 0

Shouldn`t this work? all help will be highly appreciated.

28th March 2006, 02:25 PM
Two things. The first is we see some directories here, but not the file
you were trying to execute. Could you give us a directory listing
for that file?

Second, leaving a file writable like this for all users is probably not
a safe thing to do. Perhaps you should consider a different permission/owner

And try changing the fstab line to this:
/dev/sda5 /mnt/hard-drive vfat users,rw,owner,exec,umask=000 0 0

28th March 2006, 02:56 PM
changing the fstab line like you suggested solved the problem. what could have been wrong with the old line?

29th March 2006, 03:03 AM
I believe fat (and vfat) mounts are noexec by default, which prevents executables
from running. I suppose this is because one rarely wants to run
Windows binaries on a Linux box. Anyway, by adding the exec option to
the fstab line, you permit your program to run while on the vfat partition.