ca y est j'ai pu installer sudo
j'ai donc tapper en root
sudo visudo
J'ai ajouter à la fin du fichier:
login ALL=(root) NOPASSWD:/etc/init.d/httpd, /etc/init.d/mysqld
j'ai ensuite créer un fichier /bin/allumageapache.sh
dans lequel j'ai rajouter:
#!/bin/bash
/etc/init.d/httpd start
/etc/init.d/mysqld start
puis adapter les droits:
chmod 777 allumageapache.sh
mais que je tappe en root :allumageapache.sh pas de souci
mais quand je suis pas root il me dis:
[sacha@localhost /bin]$ allumageapache.sh
/bin/allumageapache.sh: line 2: /etc/init.d/httpd: Permission non accordée
/bin/allumageapache.sh: line 3: /etc/init.d/mysqld: Permission non accordée
du coup je vois plus?
dois je passer en 777
/etc/init.d/httpd
/etc/init.d/mysqld
[^] # Re: Oui, c'est possible
Posté par gotcha5832 . En réponse au message Créer un bouton qui lance Apache. Évalué à 1.
j'ai donc tapper en root
sudo visudo
J'ai ajouter à la fin du fichier:
login ALL=(root) NOPASSWD:/etc/init.d/httpd, /etc/init.d/mysqld
j'ai ensuite créer un fichier /bin/allumageapache.sh
dans lequel j'ai rajouter:
#!/bin/bash
/etc/init.d/httpd start
/etc/init.d/mysqld start
puis adapter les droits:
chmod 777 allumageapache.sh
mais que je tappe en root :
allumageapache.shpas de soucimais quand je suis pas root il me dis:
[sacha@localhost /bin]$ allumageapache.sh
/bin/allumageapache.sh: line 2: /etc/init.d/httpd: Permission non accordée
/bin/allumageapache.sh: line 3: /etc/init.d/mysqld: Permission non accordée
du coup je vois plus?
dois je passer en 777
/etc/init.d/httpd
/etc/init.d/mysqld