LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-07-2004, 09:14 AM   #1
roald
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core 1
Posts: 6

Rep: Reputation: 0
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?
 
Old 05-07-2004, 09:35 AM   #2
andredude
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Distribution: Mandrake
Posts: 48

Rep: Reputation: 15
you've got it the wrong way around, i think - execute scripts with "./" and binaries without.
 
Old 05-07-2004, 10:17 AM   #3
roald
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core 1
Posts: 6

Original Poster
Rep: Reputation: 0
./ 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
 
Old 05-07-2004, 10:44 AM   #4
Grymme
Member
 
Registered: Apr 2004
Location: Sweden
Distribution: Slackware
Posts: 44

Rep: Reputation: 15
I would suggest using umask=022 in your fstab as a mount option.
 
Old 05-08-2004, 02:15 AM   #5
roald
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core 1
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry, tried that and it doesn't make any difference.

Roald
 
Old 05-08-2004, 02:20 AM   #6
esben
Member
 
Registered: Jun 2003
Location: Copenhagen, Denmark
Distribution: Gentoo
Posts: 48

Rep: Reputation: 15
Let's get the permission thing out of the way: Please post
Code:
ls -l (scriptname)
 
Old 05-08-2004, 03:48 AM   #7
roald
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core 1
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 05-08-2004, 04:17 AM   #8
roald
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core 1
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 06-14-2004, 06:02 AM   #9
avni
LQ Newbie
 
Registered: Jun 2004
Distribution: Fedora Core 2
Posts: 1

Rep: Reputation: 0
Re: Found it!

Quote:
Originally posted by roald
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
Actually you can only add the option "exec" after "users" or "user". No need for umask=022 since it is usually the default.

Code:
/dev/hda6 /scratch vfat noauto,users,exec,rw 0 0
This is since the user(s) options imply "noexec".
Strangly, the owner option, which is not well documented, doesn't imply "noexec" like the user(s) options.

See man mount.

Ofir Avni
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FAT32 partition ro...but not mounted ro SaurianOverlord Linux - Newbie 15 04-12-2005 10:32 PM
NTFS partition cannot be mounted after converting from FAT32 aweir14150 Mandriva 5 01-27-2005 03:11 PM
Making mounted FAT32 partition writable by all jrittvo Fedora 14 06-07-2004 02:39 AM
permissions and mounted fat32 partition ianunderwood Linux - Newbie 8 06-25-2003 05:17 AM
Executing scripts on a vfat partition maciejz Linux - General 3 05-21-2003 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration