jancelin / geo-poppy

Raspberry Pi Standalone WebSIG Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pirate non propriétaire de sa "maison"

pierrechtux opened this issue · comments

Juste après l'installation toute fraîche de Geopoppy, il est surprenant de constater que:

pirate@geopoppy:~$ git clone https://github.com/pierrechtux/geolllibre
fatal: could not create work tree dir 'geolllibre': Permission denied
pirate@geopoppy:~$ mkdir a
mkdir: cannot create directory ‘a’: Permission denied
pirate@geopoppy:~$ ls -la
total 6168
drwxr-xr-x 3 root   root      4096 Feb 14 11:17 .
drwxr-xr-x 3 root   root      4096 Jan 24 09:44 ..
-rwxr-xr-x 1 root   root      2149 Jan 24 09:44 check_docker.sh
-rw-r--r-- 1 pirate pirate    2317 Jan 24 09:44 docker-compose.yml
drwxr-xr-x 9 root   root      4096 Feb 14 11:17 geopoppy
-rw-r--r-- 1 root   root   6288569 Jan 24 09:44 geopoppy.sql
-rw-r--r-- 1 root   root      3525 Jan 24 09:44 setup-database.sh
pirate@geopoppy:~$ cd /home/
pirate@geopoppy:/home$ ls -la
total 12
drwxr-xr-x  3 root root 4096 Jan 24 09:44 .
drwxr-xr-x 22 root root 4096 Jan 24 09:39 ..
drwxr-xr-x  3 root root 4096 Feb 14 11:17 pirate

Cela se résout simplement:

pirate@geopoppy:/home$ sudo su
root@geopoppy:/home# chown pirate:pirate pirate
root@geopoppy:/home# cd pirate/
root@geopoppy:/home/pirate# ls -la
total 6168
drwxr-xr-x 3 pirate pirate    4096 Feb 14 11:17 .
drwxr-xr-x 3 root   root      4096 Jan 24 09:44 ..
-rwxr-xr-x 1 root   root      2149 Jan 24 09:44 check_docker.sh
-rw-r--r-- 1 pirate pirate    2317 Jan 24 09:44 docker-compose.yml
drwxr-xr-x 9 root   root      4096 Feb 14 11:17 geopoppy
-rw-r--r-- 1 root   root   6288569 Jan 24 09:44 geopoppy.sql
-rw-r--r-- 1 root   root      3525 Jan 24 09:44 setup-database.sh

Et ça va tout de suite mieux:

root@geopoppy:/home/pirate# su - pirate
pirate@geopoppy:~$ mkdir a
pirate@geopoppy:~$ git clone https://github.com/pierrechtux/geolllibre
Cloning into 'geolllibre'...
remote: Enumerating objects: 1102, done.
remote: Total 1102 (delta 0), reused 0 (delta 0), pack-reused 1102
Receiving objects: 100% (1102/1102), 2.96 MiB | 387.00 KiB/s, done.
Resolving deltas: 100% (707/707), done.
pirate@geopoppy:~$ 

Il pourrait être de bon ton de mettre chown pirate:pirate /home/pirate quelque part dans un script à la fin de l'installation.
Désolé, j'ai un petit peu fouiné, mais je n'ai pas su trouver dans quel script ça pouvait se mettre.

Oui, c'est en cours et sera présent pour la prochaine image.
Les droits sont momentanéments restreints au dossier Qgis et au docker-compose.yml pour éviter les mauvaises manipulation.
Le code de fabrication de l'image flashable est dispo ici:
https://github.com/jancelin/image-builder-rpi

Pour Pirate une fois connecter au ftp l'arborescence ne pas la même avec celle de la documentation et pour généré le cache pour les ortho et
geopoppy_issue1
geopoppy_issue2

osm une fois connecté sur le ssh pirate@172.24.1.1 la commande docker ne marche pas