Xampp droit d'écriture [Réglé]
Sur le dossier du site local
Logiciels / Autres logiciels

bellete Membre non connecté
-
- Voir le profil du membre bellete
- Inscrit le : 14/03/2008
- Site internet
- Groupes :
J'ai installé Xampp à partir du site: https://www.apachefriends.org/fr/index.html, c'est pour installer un wordpress en local.
L’installation se passe bien, j'ai bien le dossier /opt/lampp, et les services sont bien démarré.

J'ai bien accès à phpmyadmin par l'url: http://localhost/phpmyadmin
J'ai créé une base de données, rajouter un utilisateur en cochant tout les privilèges.
J'ai transféré le dossier wordpress dans /opt/lampp/htdocs/
Je lance l'installation de wordpress par l'url: http://localhost/wordpress
Je remplis les infos, nom de la base, utilisateur etc.
Et la une chose ne semble pas normale, il semble impossible de créé le fichier wp-config.php, je le fait donc à la main comme proposé.

Après tout ce passe bien, j'ai bien accès à l'admin du site, sauf qu'il est impossible d'installer un thème ou d'autre plugins.
J'ai un message qui me demande si le dossier parent est accessible en écriture par le serveur.

Il faudrait probablement donner les droits d'écriture, mais ou? Quelque chose que j'aurais oublié?
Merci d'avance pour une aide, j'avoue que la je cale.
Bonne journée à tout le monde.
Boitier Antec P100 | Alimentation modulaire Cooler Master MWE Gold 650 Full Modular | Carte mère MSI B450 Tomawak | Processeur AMD Ryzen 5 1600X | Ventirad Cooler Master Hyper 212 Black Edition | Mémoire Corsair - Vengeance LPX Series DDR4 Low Profile 2 x 4 Go 2666 MHz CAS 16 | Carte graphique Asus Getforce GT 730.
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données

Papoteur Membre non connecté
-
- Voir le profil du membre Papoteur
- Inscrit le : 03/10/2011
- Groupes :
-
Modérateur
-
Équipe Mageia
-
Administrateur
-
Forgeron
Perso, j'aurais fait :
urpmi task-lamp-php
Tu serais resté dans le standard de Mageia et aurais trouvé les bons conseils.
Manifestement, tu as un problème d'appartenance des répertoires à l'utilisateur adéquat. Cependant ne connaissant pas Xampp, je ne sais pas où se situent les répertoires de stockage, ni quel doit être l'utilisateur propriétaire de ces répertoires.
Yves

bellete Membre non connecté
-
- Voir le profil du membre bellete
- Inscrit le : 14/03/2008
- Site internet
- Groupes :
Boitier Antec P100 | Alimentation modulaire Cooler Master MWE Gold 650 Full Modular | Carte mère MSI B450 Tomawak | Processeur AMD Ryzen 5 1600X | Ventirad Cooler Master Hyper 212 Black Edition | Mémoire Corsair - Vengeance LPX Series DDR4 Low Profile 2 x 4 Go 2666 MHz CAS 16 | Carte graphique Asus Getforce GT 730.
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données

bellete Membre non connecté
-
- Voir le profil du membre bellete
- Inscrit le : 14/03/2008
- Site internet
- Groupes :
J'essaye de suivre cette page du wiki: https://www.mageialinux-online.org/wiki/installer-un-serveur-lamp-sous-mageia
Mais je n'arrive pas à mettre un mot de passe pour se connecter à phpmyadmin. Le service mysqld est bien lancé. J'ai mis test comme mot de passe.
La console me renvoie ceci:
Caché :
[gil@localhost ~]$ su
Mot de passe :
[root@localhost gil]# mysqladmin password test
mysqladmin:
You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead
[root@localhost gil]#
Mot de passe :
[root@localhost gil]# mysqladmin password test
mysqladmin:
You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead
[root@localhost gil]#
Boitier Antec P100 | Alimentation modulaire Cooler Master MWE Gold 650 Full Modular | Carte mère MSI B450 Tomawak | Processeur AMD Ryzen 5 1600X | Ventirad Cooler Master Hyper 212 Black Edition | Mémoire Corsair - Vengeance LPX Series DDR4 Low Profile 2 x 4 Go 2666 MHz CAS 16 | Carte graphique Asus Getforce GT 730.
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données

bellete Membre non connecté
-
- Voir le profil du membre bellete
- Inscrit le : 14/03/2008
- Site internet
- Groupes :
Caché :
[gil@localhost ~]$ su
Mot de passe :
[root@localhost gil]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Sorry, passwords do not match.
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
[root@localhost gil]#
Mot de passe :
[root@localhost gil]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Sorry, passwords do not match.
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
[root@localhost gil]#
Boitier Antec P100 | Alimentation modulaire Cooler Master MWE Gold 650 Full Modular | Carte mère MSI B450 Tomawak | Processeur AMD Ryzen 5 1600X | Ventirad Cooler Master Hyper 212 Black Edition | Mémoire Corsair - Vengeance LPX Series DDR4 Low Profile 2 x 4 Go 2666 MHz CAS 16 | Carte graphique Asus Getforce GT 730.
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données

bellete Membre non connecté
-
- Voir le profil du membre bellete
- Inscrit le : 14/03/2008
- Site internet
- Groupes :
Tout se passe bien, sauf que j'ai le même problème de droit d'écriture.
En cherchant un peu j'ai fait en console root : chmod -R 777 /var/www/html
[gil@localhost ~]$ su
Mot de passe :
[root@localhost gil]# chmod -R 777 /var/www/html
[root@localhost gil]#
Et bingo !! Du coup Wordpress fonctionne nickel, je sais que ce n'est pas bon de mettre les droits en 777, mais bon ici en local je m'en fiche un peu.
Donc pour ne pas tout mélanger, j'ai utilisé l'option urpmi task-lamp-php, mais je suppose que pour la version Xampp du site, il fallait donner les droits de la même façon.
Je passe en résolu.
Edit: je confirme avec Xampp c'est pareil, en console root:
[gil@localhost ~]$ su
Mot de passe :
[root@localhost gil]# chmod -R 777 /opt/lampp/htdocs
[root@localhost gil]#
Édité par bellete Le 24/02/2020 à 20h25
Boitier Antec P100 | Alimentation modulaire Cooler Master MWE Gold 650 Full Modular | Carte mère MSI B450 Tomawak | Processeur AMD Ryzen 5 1600X | Ventirad Cooler Master Hyper 212 Black Edition | Mémoire Corsair - Vengeance LPX Series DDR4 Low Profile 2 x 4 Go 2666 MHz CAS 16 | Carte graphique Asus Getforce GT 730.
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données
SSD Western Digital - Green - 240 Go - Mageia 8 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Crucial BX500 240 Go - Mageia 9 (64 bits) - Bureau Plasma - Pilote nouveau
SSD Western Digital - Green - 240 Go- Virtualbox
1 disque Seagate - BarraCuda - 2 To: données
1 disque Western Digital - Blue - 1 To : données

Papoteur Membre non connecté
-
- Voir le profil du membre Papoteur
- Inscrit le : 03/10/2011
- Groupes :
-
Modérateur
-
Équipe Mageia
-
Administrateur
-
Forgeron
C'est très bien que tu aies trouvé une solution.
Par contre elle n'est pas recommandable.
Ce qu'il faut faire, c'est donner la propriété des fichiers à apache
Code BASH :
cd /var/www/html chown -R apache:apache * chmod -R go-xw /var/www/html
La dernière commande retire l'écriture et l'exécution au groupe et aux autres.
Yves
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie