LinuxQuestions.org
Help answer threads with 0 replies.
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 12-16-2004, 10:58 AM   #1
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Rep: Reputation: 15
I can't execute scripts in mounted fs


Hello

I'm having a problem with executing scripts if they are in my mounted fat partition
I get a permission denied error
bash: ./test.sh: Permission denied

while the file permissions should allow execution:
-rwxrwxrwx 1 root root 18 2004-12-16 00:53 test.sh

that partition line in /etc/fstab is this:
/dev/hdb1 /mnt/hdb1 rw,user,auto,umask=000 0 0

I can correctly read/write files, the problem reguards only execution.

is it supposed to work like this or am I doing something wrong?
 
Old 12-16-2004, 01:57 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
First of all I can't see a file-system in that fstab
entry ...


Cheers,
Tink
 
Old 12-16-2004, 04:12 PM   #3
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
That problem is a sneaky one. What you need to remember is that mount options override filesystem perms. The mount options must include exec in order to execute a file on a mounted fs.

And yes there really should be an fstype entry, but mount is pretty good at guessing fstypes.
 
Old 12-16-2004, 06:36 PM   #4
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Original Poster
Rep: Reputation: 15
sorry, my fault. there IS a fstype entry (vfat), it's just that for some reason I didn't copy-pasted the line but I copied it manually and forgot that -_-'

anyway the exec parameter made it work, thanks!
 
  


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
Can't execute NFS mounted script hexbox Linux - Networking 2 02-03-2005 05:59 PM
Unable to execute sh scripts zowey Mandriva 2 12-23-2004 03:59 PM
execute bash scripts vapor Programming 9 07-14-2003 02:54 PM
cant execute any scripts Phonics3k Linux - Newbie 2 06-19-2002 08:00 AM
How to execute Linux scripts LenkaNguyen Linux - General 2 12-07-2001 03:12 PM

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

All times are GMT -5. The time now is 12:15 AM.

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