Fail to execute a binary file from a CD...
Patrick Gelin
patrick.gelin at free.fr
Fri Feb 16 16:04:19 UTC 2007
ok, I fixed the problem copying all the CD content file into my PC and take
owner over all.
Thank you for your help!
Andy wrote:
> On 16/02/07, Patrick Gelin <patrick.gelin at free.fr> wrote:
>> gelinp at gelinp-desktop:/media/cdrom0$ sudo ./installUnix
>> sudo: unable to execute ./installUnix: Permission denied
>>
>> What is the problem?
>
> CDs have user as an option in /etc/fstab.
> user adds the options noexec, nosuid, and nodev for security.
> You wouldn't want a user being ables to save an SUID binary on a
> machine they had root access to and then running it on a PC they
> didn't to elevate privileges. Similar reasoning applies to the nodev.
>
> If you trust every user you could edit /etc/fstab to allow execution.
> (add ,exec after noauto) NOT recommended, for security reasons.
>
> Or you can mount the CD as root with different options.
> try: umount /media/cdrom0
> mount /dev/hdc /media/cdrom0 -t udf,iso9660 -o
> exec,umask=0222,nosuid,nodev not 100% sure that command is right btw.
> replace /dev/hdc with whatever device is your CD drive.
> replace /media/cdrom0 with wherever your CD is mounted
> (the umask allows all users to read and execute, if you don't want
> that then omit that bit but you will need to run the file from the CD
> as root, which is a bad idea).
>
> Or you could just copy the file, and everything else it needs to a
> directory on your hard drive and chmod u+x filename
> (a problem if its looking for files on the CD, but safer).
>
> If you are the only user on the machine then you might not need to be
> so concerned about all users being able to execute stuff for option 2.
>
> Hope that helps
>
> Andy
More information about the ubuntu-users
mailing list