LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   I can't execute scripts in mounted fs (https://www.linuxquestions.org/questions/linux-general-1/i-cant-execute-scripts-in-mounted-fs-267068/)

Dasc 12-16-2004 10:58 AM

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?

Tinkster 12-16-2004 01:57 PM

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


Cheers,
Tink

kevinalm 12-16-2004 04:12 PM

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.

Dasc 12-16-2004 06:36 PM

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!


All times are GMT -5. The time now is 02:36 PM.