• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[solved] Shellskripte von best. Festplatte nicht ausführbar?

Liebe Experte,
ich habe folgende Problem (und ich fürchte es wird mich mal wieder als Unwissenden und Windows-Verdorbenen outen :eek: )

Auf meinem Rechner (Suse 10.0) kann ich von einer Festplate keine Shell-Skripte ausführen. Ich bekomme die Meldung :

bash: ./helloworld.sh: /bin/sh: bad interpreter: Permission denied

Das Skript ist OK (ich habe es extra auf ein Minimum reduziert), ich versuche das ganze als root.
-rwxr-xr-x 1 root root 29 Jul 24 11:43 helloworld.sh

Kopiere ich das Skript an eine andere Stelle, wird es klaglos ausgeführt.

Ich habe natürlich schon ein wenig geschaut, aber nichts gefunden.
Dabei ging es aber auch um Ausführungsrechte beim mounten, darum noch ein Ausdruck meiner /etc/fstab. Es geht um /hdd2.
'noexec' steht da jedenfalls nicht.

/dev/sda6 / reiserfs acl,user_xattr 1 1
/dev/sda5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/sdb2 /hdd2 auto auto,user 0 0
/dev/cdrom /media/cdrom subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
none /subdomain subdomainfs noauto 0 0
10.144.36.114:/ /copy nfs defaults 0 0


Jemand einen Tipp ?
Danke !

Gruß

Christian
 
man mount
user Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount
the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent
options, as in the option line user,exec,dev,suid).
Also einfach die Mount-Option 'exec' hinzufügen (hinter die Option 'user') :wink:

Btw:
:twisted: Crosspostings sind unhöflich. => http://linuxforen.de/forums/showthread.php?t=218279
 
Die mount Option user impliziert die Optionen noexec, nosuid, nodev, mehr dazu in man mount.
Um trotzdem von der Platte ausführen zu können muss die Mountoption exec explizit gesetzt werden.
/dev/sdb2 /hdd2 auto auto,user,exec 0 0
 
Wow !

Mein erstes Posting in diesem Forum und dann nach ca. 10 min Antworten, die das Problem tatsächlich lösen !

Ich bin begeistert :lol: !

Vielen Dank :!:

Gruß

Christian
 
Oben