sur le serveur aircox - propriétaire des fichiers #34

Closed
opened 2022-03-12 13:58:33 +00:00 by tierce · 3 comments
Owner

Je trouve ça étonnant qu'il y en ait à aircox:www-data et d'autre à root:root, par exemple…

# ls -l /srv/www/aircox/instance                                                                   
total 56
-rwxr-xr-x 1 root   root      672 May 29  2020 dev.py
-rwxr-xr-x 1 aircox www-data    0 Sep 23  2019 __init__.py
-rw-r--r-- 1 aircox aircox    123 Sep 30  2019 __init__.pyc
-rw-r--r-- 1 root   root     1053 Jan  5  2021 ldap-jsnet.py
-rw-r--r-- 1 aircox www-data 1086 Jan  5  2021 ldap.py
-rwxr-xr-x 1 root   root      610 May 29  2020 prod.py
drwxr-xr-x 2 aircox www-data 4096 Jan  9 15:23 __pycache__
-rwxr-xr-x 1 root   root     7314 Jan  9 15:18 sample_settings.py
-rw-r--r-- 1 aircox www-data 9158 Jan  9 15:22 settings.py
-rwxr-xr-x 1 root   root     1343 Sep 22  2020 urls.py
-rwxr-xr-x 1 aircox www-data  391 Sep 23  2019 wsgi.py
-rw-r--r-- 1 aircox aircox    580 Sep 30  2019 wsgi.pyc
  • faire un chown -R aircox:www-data /srv/www/aircox ?
Je trouve ça étonnant qu'il y en ait à `aircox:www-data` et d'autre à `root:root`, par exemple… ``` # ls -l /srv/www/aircox/instance total 56 -rwxr-xr-x 1 root root 672 May 29 2020 dev.py -rwxr-xr-x 1 aircox www-data 0 Sep 23 2019 __init__.py -rw-r--r-- 1 aircox aircox 123 Sep 30 2019 __init__.pyc -rw-r--r-- 1 root root 1053 Jan 5 2021 ldap-jsnet.py -rw-r--r-- 1 aircox www-data 1086 Jan 5 2021 ldap.py -rwxr-xr-x 1 root root 610 May 29 2020 prod.py drwxr-xr-x 2 aircox www-data 4096 Jan 9 15:23 __pycache__ -rwxr-xr-x 1 root root 7314 Jan 9 15:18 sample_settings.py -rw-r--r-- 1 aircox www-data 9158 Jan 9 15:22 settings.py -rwxr-xr-x 1 root root 1343 Sep 22 2020 urls.py -rwxr-xr-x 1 aircox www-data 391 Sep 23 2019 wsgi.py -rw-r--r-- 1 aircox aircox 580 Sep 30 2019 wsgi.pyc ``` * [ ] faire un `chown -R aircox:www-data /srv/www/aircox` ?
Owner

Oui il me semble que c'est mieux.

Oui il me semble que c'est mieux.
tierce added the
gnuragistes
label 2022-04-30 16:16:07 +00:00
Author
Owner

Je préfèrerais faire un « backup des permissons actuelles » avant de faire un chown sur tout les fichiers … comme ça si ça foire, on pourrait revenir en arrière.

… mais je sais pas encore avec quoi faire cette sauvegarde des permissions 🙂

Faudrait peut-être installer getfacl / setfacl qui fonctionne avec les droits unix « de base ».

Je préfèrerais faire un « backup des permissons actuelles » avant de faire un `chown` sur tout les fichiers … comme ça si ça foire, on pourrait revenir en arrière. … mais je sais pas encore avec quoi faire cette sauvegarde des permissions 🙂 Faudrait peut-être installer `getfacl` / `setfacl` qui fonctionne avec les droits unix « de base ».
Author
Owner

j'ai rsync le dossier vers '/srv/www/aircox.bak' avent de faire le chown -R aircox:www-data /srv/www/aircox et on dirait que c'est ok.

j'ai rsync le dossier vers '/srv/www/aircox.bak' avent de faire le `chown -R aircox:www-data /srv/www/aircox` et on dirait que c'est ok.
Sign in to join this conversation.
No description provided.