bluesdog
04-19-2007, 08:52 PM
Although my /home folder, and most other stuff is currently on my boot drive, sda, there are times I would like to be able to run scripts or binary files from folders on my extra hard drives, hda and hdb.
But because these drives are mounted with 'noexec', I cannot...
Relevant lines from fstab:
/dev/hda1 /mnt/hda ext3 defaults,user 0 2
/dev/hdb1 /mnt/hdb reiserfs defaults,user 0 2
Corresponding result of cat /etc/mtab:
/dev/hda1 /mnt/hda ext3 rw,noexec,nosuid,nodev 0 0
/dev/hdb1 /mnt/hdb reiserfs rw,noexec,nosuid,nodev 0 0
How do I, or can I, modify /etc/fstab so I can automagically mount /mnt/hda and/or /mnt/hdb with exec privileges?
Reading fstab and mount man pages tells me the 'defaults' switch normally includes exec: defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.Adding 'exec' explicitly to the appropriate lines in fstab makes no difference.
I suspect fstab is being superceded by something else, probably udev, so no doubt there's some weird udev rule I'll have to modify or create, but udev is just so darn weird I don't know where to start
:confused:
I have no problems running executables on my sda drive, obviously..
Any suggestions?
Solution:
I played around some more with /etc/fstab
/dev/hda1 /mnt/hda ext3 user,auto,dev,exec,suid,rw 0 2
/dev/hdb1 /mnt/hdb reiserfs user,auto,dev,exec,suid,rw 0 2
/dev/hda1 /mnt/hda ext3 rw 0 0
/dev/hdb1 /mnt/hdb reiserfs rw 0 0
Although as noted previously, man mount claims 'default' includes 'exec' rights, only when I explicitly typed the appropriate switches, leaving out the 'default' switch, I was able to execute scripts located on hda and hdb
Go figure :biggrin:
But because these drives are mounted with 'noexec', I cannot...
Relevant lines from fstab:
/dev/hda1 /mnt/hda ext3 defaults,user 0 2
/dev/hdb1 /mnt/hdb reiserfs defaults,user 0 2
Corresponding result of cat /etc/mtab:
/dev/hda1 /mnt/hda ext3 rw,noexec,nosuid,nodev 0 0
/dev/hdb1 /mnt/hdb reiserfs rw,noexec,nosuid,nodev 0 0
How do I, or can I, modify /etc/fstab so I can automagically mount /mnt/hda and/or /mnt/hdb with exec privileges?
Reading fstab and mount man pages tells me the 'defaults' switch normally includes exec: defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.Adding 'exec' explicitly to the appropriate lines in fstab makes no difference.
I suspect fstab is being superceded by something else, probably udev, so no doubt there's some weird udev rule I'll have to modify or create, but udev is just so darn weird I don't know where to start
:confused:
I have no problems running executables on my sda drive, obviously..
Any suggestions?
Solution:
I played around some more with /etc/fstab
/dev/hda1 /mnt/hda ext3 user,auto,dev,exec,suid,rw 0 2
/dev/hdb1 /mnt/hdb reiserfs user,auto,dev,exec,suid,rw 0 2
/dev/hda1 /mnt/hda ext3 rw 0 0
/dev/hdb1 /mnt/hdb reiserfs rw 0 0
Although as noted previously, man mount claims 'default' includes 'exec' rights, only when I explicitly typed the appropriate switches, leaving out the 'default' switch, I was able to execute scripts located on hda and hdb
Go figure :biggrin: