etiennegaloup Posted February 19, 2005 Share Posted February 19, 2005 Bonjour à tous, j'ai un petit problème pour exécuter des scripts en root. Quand j'en exécute un, il me répond: /bin/sh bad interpreter:permission non accordée J'ai essayé avec un script tout bête genre: #!/bin/sh echo "toto" J'ai vérifié les permissions de /bin/sh et /bin/bash, et elles sont correctes. D'oû ça peut bien venir ? Ciao Link to comment Share on other sites More sharing options...
lorinc Posted February 19, 2005 Share Posted February 19, 2005 tu as quoi comme droit dessus? (et sur bash, évidement) lorinc parmenion $ ls -l /bin/sh lrwxrwxrwx 1 root root 4 sep 11 01:43 /bin/sh -> bash lorinc parmenion $ ls -l /bin/bas basename bash lorinc parmenion $ ls -l /bin/bash -rwxr-xr-x 1 root root 629300 sep 11 01:43 /bin/bash chez moi Link to comment Share on other sites More sharing options...
AigleDor Posted February 19, 2005 Share Posted February 19, 2005 as tu vérifié les droits sur le script lui même? Link to comment Share on other sites More sharing options...
etiennegaloup Posted February 20, 2005 Author Share Posted February 20, 2005 Hello, les droits de mes fichiers sont: HOME:~#ls -l myscript -rwxr--r-- 1 root root myscript HOME:~#ls -l /bin/bash -rwxr-xr-x 1 root root /bin/bash Merci pour vos réponses... Link to comment Share on other sites More sharing options...
neologix Posted February 20, 2005 Share Posted February 20, 2005 Ton symlink /bin/sh pointe bien vers /bin/bash? Sinon: ln -sfn /bin/bash /bin/sh Essaie déjà de remplacer dans ton script /bin/sh par /bin/bash neo Link to comment Share on other sites More sharing options...
etiennegaloup Posted February 20, 2005 Author Share Posted February 20, 2005 Oui je l'ai fait déjà mais rien à faire.... Link to comment Share on other sites More sharing options...
neologix Posted February 20, 2005 Share Posted February 20, 2005 Attends... La partition sur laquelle se trouve le script ne serait pas montée en noexec? Ou en users? Essaie un defaults dans ton fstab. Link to comment Share on other sites More sharing options...
gauret Posted February 20, 2005 Share Posted February 20, 2005 Si tu fais un chmod +x sur ton script, est-ce qu'un utilisateur normal peut le lancer correctement ? Link to comment Share on other sites More sharing options...
etiennegaloup Posted February 20, 2005 Author Share Posted February 20, 2005 Non un utilisateur normal ne peut pas non plus... J'ai crée un script avec cet utilisateur et pareil, j'ai le même message. Sinon un chmod +x n'a rien changé. De toute manière les droits d'exécution était attribué au propriétaire du script. Merci pour votre aide. Link to comment Share on other sites More sharing options...
gauret Posted February 20, 2005 Share Posted February 20, 2005 Si tu mets juste "echo toto" dans ton script et que tu le lances avec "bash monscript", est-ce que ça marche ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.