Alors voici mon ficher "visudo"
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
j'essaye donc de lancer allumageapache.sh
et là: [sacha@localhost ~]$ 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
je reverifie les droits sous /etc/init.d -rwx------ 1 root root 9441 2008年03月08日 01:22 httpd*
-rwx------ 1 root root 12219 2009年07月27日 00:29 mysqld*
je remet les droits en 777 [root@localhost /etc/init.d]# chmod 777 httpd
[root@localhost /etc/init.d]# chmod 777 mysqld
Je sors du compte root, relance allumageapach.sh:
[sacha@localhost /etc/init.d]$ allumageapache.sh
Starting httpd: (13)Permission denied: make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
Unable to open logs
[�CHEC ]
ls: ne peut ouvrir le r�pertoire /var/lib/mysql/mysql: Permission non accord�e
Initializing MySQL database:
Installing MySQL system tables...
091127 15:49:18 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
091127 15:49:18 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
091127 15:49:18 [Warning] One can only use the --user switch if running as root
ERROR: 1347 'mysql.db' is not BASE TABLE
091127 15:49:18 [ERROR] Aborting
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
The latest information about MySQL is available on the web at http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
chown: ne peut lire le r�pertoire `/var/lib/mysql': Permission non accord�e
chmod: modification des permissions de `/var/lib/mysql': Op�ration non permise
Starting MySQL: /etc/init.d/mysqld: line 165: kill: (5886) - Aucun processus de ce type
[�CHEC ]
Et bah je pensais que ca serais simple mais non...
[^] # Re: Oui, c'est possible
Posté par gotcha5832 . En réponse au message Créer un bouton qui lance Apache. Évalué à 1.
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
#test
login ALL=(root) NOPASSWD:/etc/init.d/httpd, /etc/init.d/mysqld
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
j'essaye donc de lancer allumageapache.sh
et là:
[sacha@localhost ~]$ 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
je reverifie les droits sous /etc/init.d
-rwx------ 1 root root 9441 2008年03月08日 01:22 httpd*-rwx------ 1 root root 12219 2009年07月27日 00:29 mysqld*
je remet les droits en 777
[root@localhost /etc/init.d]# chmod 777 httpd[root@localhost /etc/init.d]# chmod 777 mysqld
Je sors du compte root, relance allumageapach.sh:
[sacha@localhost /etc/init.d]$ allumageapache.sh
Starting httpd: (13)Permission denied: make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
Unable to open logs
[�CHEC ]
ls: ne peut ouvrir le r�pertoire /var/lib/mysql/mysql: Permission non accord�e
Initializing MySQL database:
Installing MySQL system tables...
091127 15:49:18 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
091127 15:49:18 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
091127 15:49:18 [Warning] One can only use the --user switch if running as root
ERROR: 1347 'mysql.db' is not BASE TABLE
091127 15:49:18 [ERROR] Aborting
091127 15:49:18 [Note] /usr/sbin/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
chown: ne peut lire le r�pertoire `/var/lib/mysql': Permission non accord�e
chmod: modification des permissions de `/var/lib/mysql': Op�ration non permise
Starting MySQL: /etc/init.d/mysqld: line 165: kill: (5886) - Aucun processus de ce type
[�CHEC ]
Et bah je pensais que ca serais simple mais non...