problem executing scripts on mounted fat32 partition
Hi,
I have a problem with executing e.g. perl scripts that are on a mounted drive. I have Fedora Core 1 installed on an ext3 partition and an extra fat32 partition. The fat32 partition is mounted with the command "mount /scratch", with in my fstab "/dev/hda6 /scratch vfat noauto,users,rw 0 0". In my home directory I have no problem executing any scripts or binaries, but I cannot do that in directories on the mounted partition. What does work is "perl script.pl" but not "script.pl". When I try to execute a binary ("./program.x"), I get the error "bash: ./program.x: Permission denied", but for all files I do have execute permissions. It doesn't make a difference if I do this as root or as a user. I suspect it has to do with how I mount the partition, and may be related to the problem that I cannot unmount the partition with "umount /scratch" (error: "/scratch: device is busy"). Anybody has a clue to what is the problem? |
you've got it the wrong way around, i think - execute scripts with "./" and binaries without.
|
./ just indicates that the file I want to execute is in the current directory. Both "./binary.x" and "binary.x" do the same thing in my case (I tried), which is what I expected since ./ is the first directory listed in my "$PATH".
Thanks anyway, Roald |
I would suggest using umask=022 in your fstab as a mount option.
|
Sorry, tried that and it doesn't make any difference.
Roald |
Let's get the permission thing out of the way: Please post
Code:
ls -l (scriptname) |
ls -l script.pl gives:
-rwxr-xr-x 1 roald roald 37 May 7 14:49 script.pl I don't know about the 1; for the rest I would say: permissions 1?? user group filesize date time filename |
Found it!
Thanks for the help, but I found the solution. For those interested, mounting with:
"/dev/hda6 /scratch vfat noauto,owner,umask=022 0 0" instead of: "/dev/hda6 /scratch vfat noauto,users,rw 0 0" works fine! It allows me to execute files and also solves the umount and some other things, like I wasn't able to change the group of my own files (chgrp ..). Thanks anyway! Roald |
Re: Found it!
Quote:
Code:
/dev/hda6 /scratch vfat noauto,users,exec,rw 0 0 Strangly, the owner option, which is not well documented, doesn't imply "noexec" like the user(s) options. See man mount. Ofir Avni |
All times are GMT -5. The time now is 02:58 PM. |