• [^] # Re: Oui, c'est possible

    Posté par . En réponse au message Créer un bouton qui lance Apache. Évalué à 1.

    Bah ecoute c'est idem:

    voiçi mon ficher quand je tappe visudo (/etc/sudoers):

    # 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


    il me dis:

    [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 retourne donc voir dans /etc/init.d les droits des fichiers, et la je vois:

    -rwx------ 1 root root 9441 2008年03月08日 01:22 httpd*
    -rwx------ 1 root root 12219 2009年07月27日 00:29 mysqld*

    les fichiers ne sont plus en 777
    je les repasse donc en 777

    [root@localhost /etc/init.d]# chmod 777 httpd
    [root@localhost /etc/init.d]# chmod 777 mysqld

    je sors du compte root, relance allumageapache.sh et la:

    [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:55:12 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
    091127 15:55:12 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test
    091127 15:55:12 [Warning] One can only use the --user switch if running as root

    ERROR: 1347 'mysql.db' is not BASE TABLE
    091127 15:55:12 [ERROR] Aborting

    091127 15:55:12 [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: (6816) - Aucun processus de ce type
    [�CHEC ]


    Bon du coup je pensais que ca serais un truc tout simple, mais en faite ... non