You build yourself a virtual (or real, come to that) CentOS server, on which you plan to install Oracle. You have prepared your Oracle DVD ISO in the manner I described In an earlier post here. You insert that DVD (or get the virtual machine manger to present the ISO as though a physical DVD had been inserted) and CentOS helpfully auto-mounts it. You become the oracle user and invoke the runInstaller script… and you get told
−bash: /media/CDROM/runInstaller: /bin/sh: bad interpreter: Permission denied
What’s wrong? Well, CentOS (like a lot of distros before it) has ‘broken’ auto-mount by ensuring that “noexec” permissions are set for auto-mounted CDs and DVDs. The idea is that ordinary users can’t run executables from removable media -and, in most circumstances, that might be a sensible security measure to have in place. But not in this case! In this case, the oracle user (who counts, in this context, as decidedly ‘ordinary’!) must be able to execute that runInstaller script. How then to allow that? Easy:
umount /media/CDROM mount -o loop /dev/hdc /media
Those two commands (both issued as root) first dismount the automounted CD or DVD and then re-mount it as a loop device. Manually mounting the drive causes the “exec” permission to be set… and thereafter, the oracle user will be able to run the installation script without a problem.
Of course, the specifics of those commands will need to be changed to suit your local circumstances. The DVD drive might not be /dev/hdc, for example, and you might want to mount the contents of your ISO image somewhere other than /media. But hopefully, you get the idea.
Incidentally: if you don’t know what device name identifies your DVD drive, try mounting it after the drive has already auto-mounted. For example, when I ‘insert’ my ISO image, it gets mounted as /media/CDROM. So if I then try, as root, to mount /media/CDROM again, I get told:
mount: /dev/hdc already mounted on /media/CDROM
…and right at the beginning of that error message, there’s your proper device identifier.
(Note: this post was transferred from the old Dizwell dokuwiki website. Its content may no longer be relevant).