source: TOOLS/SYNCHRO_SCRIPTS/synchro_igcmg_to_ciclad @ 5959

Last change on this file since 5959 was 5943, checked in by jgipsl, 3 years ago

Set write and execute permission for the group igcmg at ciclad and obelix

File size: 2.2 KB
Line 
1#!/bin/bash
2
3echo "Quel est votre login sur Ciclad "
4echo -n "Votre reponse : "
5read loginCiclad
6
7
8cd /ccc/work/cont003/igcmg/igcmg
9
10echo " Resultat du rsync en dry-run : "
11echo ""
12rsync -n --omit-dir-times   -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c  blowfish"  --exclude='CMIP6/*' --exclude='suivi-de-consomation/*' IGCM/ ${loginCiclad}@ciclad.ipsl.jussieu.fr:/projsu/igcmg/IGCM/
13
14echo "Voulez vous effectuer les actions listees ci dessus oui/non ?"
15echo -n " Votre reponse : "
16read reponse
17
18case ${reponse} in
19
20oui|OUI|o)
21rsync --omit-dir-times   -vrltgoD --progress --chmod=o-w --chmod=g-w --chmod=u-w --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish"  --exclude='CMIP6/*' --exclude='suivi-de-consomation/*' IGCM/ ${loginCiclad}@ciclad.ipsl.jussieu.fr:/projsu/igcmg/IGCM/
22;;
23non|NON|n)
24
25
26echo "Voulez vous sauvegarder la liste des actions dans un fichier oui/non ?"
27echo -n "Votre reponse : "
28read reponse2
29
30case ${reponse2} in
31
32oui|OUI|o) 
33VAR=`date +%Y-%m-%d`
34NAME=`whoami`
35rsync -n  --omit-dir-times  -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish"  --exclude='CMIP6/*'  --exclude='suivi-de-consomation/*'  IGCM/ ${loginCiclad}@ciclad.ipsl.jussieu.fr:/projsu/igcmg/IGCM/ > /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ciclad_${NAME}_${VAR}.txt
36echo "vous trouverez la liste dans /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ciclad_${NAME}_${VAR}.txt"
37;;
38non|NON|n) 
39;;
40*)
41echo "Reponse non reconnue"
42;;
43esac
44
45
46echo "FIN SCRIPT SYNCHRO ! nous passons à la mise à jour des droits "
47;;
48*)
49echo "Reponse non reconnue"
50;;
51esac
52
53echo "Mise a jour des droits sur les repertoires de donnees (ciclad), presse entree"
54read pause
55ssh ${loginCiclad}@ciclad.ipsl.jussieu.fr "setfacl -R -m u::rwX,g::rwX,o::r-X /projsu/igcmg/IGCM"
56
57
58
59echo "Verification des droits des repertoires TGCC"
60ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM
61is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l`
62if [ "x${is_problem}" != "x0" ] 
63then
64  echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas"
65  echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits"
66fi 
Note: See TracBrowser for help on using the repository browser.