[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: execution of shell scripts from cdrom



On Tue, Nov 07, 2000 at 10:37:02AM +0100, Danny Lathouwers wrote:
> Dear community,
> 
> I wanted to execute a shell script from /cdrom and it fails with the following message:
> bash: ./scriptname: Permission denied.
> The script is executable and is run as root, so should work.
> Copying the script to ~ works but i really need to run it from /cdrom.
> Does this have anything to do with ro mounting of the cdrom (removing it from fstab did not help as the write protection
> is recognized and it is still mounted ro).

Ah, you're so close:)
It has to do with the "noexec" option to mount. This option is propably
in disguish. Most likely you'll see a "user" option in /etc/fstab for
the cdrom device. This "nouser" option implies "noexec". Override this
on the command line with the "-o exec" flag like in:

# mount /cdrom -o exec

I would advice against adding this "exec" option in the /etc/fstab file
as this would seriously compromise security! As is it is only available
to root, and needs an explicit action, and that's the way to go.

-- 
groetjes, carel



Reply to: