Commit d444ba30da9be601512068a2897567fb03c49bb9
1 parent
c344b37f
Exists in
master
and in
110 other branches
mkdir...,0775 doesnot work - added chmod...,0775 + copy to paramDef xml if it doesnit exist
Showing
5 changed files
with
19 additions
and
8 deletions
Show diff stats
php/RemoteDataCenter/RemoteDataCenterClass.php
php/RemoteDataCenter/RemoteParamManager.php
... | ... | @@ -20,10 +20,12 @@ class RemoteParamManager |
20 | 20 | |
21 | 21 | if (!is_dir(RemoteData."/PARAMS")) |
22 | 22 | mkdir(RemoteData."/PARAMS", 0775, true); |
23 | + chmod(RemoteData."/PARAMS",0775); | |
23 | 24 | |
24 | 25 | if (!is_dir(RemoteData."/PARAMS_INFO")) |
25 | 26 | mkdir(RemoteData."/PARAMS_INFO", 0775, true); |
26 | - | |
27 | + chmod(RemoteData."/PARAMS_INFO",0775); | |
28 | + | |
27 | 29 | $this->xmlName = USERWSDIR."RemoteParams.xml"; |
28 | 30 | $this->xmlDom = new DomDocument("1.0"); |
29 | 31 | |
... | ... |
php/RemoteDataCenter/THEMIS.php
php/RemoteDataCenter/getRemoteDDBaseProxies.php
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | // only "DDBASE" Bases.xml |
18 | 18 | if (!file_exists(DATAPATH."/RemoteData/Bases.xml")) { |
19 | 19 | if (!is_dir(DATAPATH."/RemoteData")) mkdir(DATAPATH."/RemoteData", 0775, true); |
20 | + chmod(DATAPATH."/RemoteData",0775); | |
20 | 21 | echo 'No Bases.xml file : Will use Bases.xml from DDBase'.PHP_EOL; |
21 | 22 | $basesDom = new DomDocument("1.0"); |
22 | 23 | |
... | ... | @@ -30,6 +31,7 @@ |
30 | 31 | $baseDir = DATAPATH."/RemoteData/$baseId"; |
31 | 32 | $baseDirRemote = DDSERVICE."/BASE/INFO/bases/$baseId"; |
32 | 33 | if (!is_dir($baseDir)) mkdir($baseDir, 0775, true); |
34 | + chmod($baseDir,0775); | |
33 | 35 | if (!copy("$baseDirRemote/base.xml", "$baseDir/base.xml")) |
34 | 36 | echo "Cannot copy base.xml for $baseId".PHP_EOL; |
35 | 37 | } |
... | ... | @@ -52,6 +54,7 @@ |
52 | 54 | $baseDir = DATAPATH."/RemoteData/$baseId"; |
53 | 55 | $baseDirRemote = DDSERVICE."/BASE/INFO/bases/$baseId"; |
54 | 56 | if (!is_dir($baseDir)) mkdir($baseDir, 0775, true); |
57 | + chmod($baseDir,0775); | |
55 | 58 | if (!copy("$baseDirRemote/base.xml", "$baseDir/base.xml")) { |
56 | 59 | echo "Cannot copy base.xml for $baseId".PHP_EOL; |
57 | 60 | } |
... | ... |
update_amda/makeRemote
... | ... | @@ -42,19 +42,23 @@ |
42 | 42 | # "DDBASE side" ( CDAWEB-like ) data centers |
43 | 43 | # |
44 | 44 | |
45 | - sudo chmod -R g+wrx $RemoteData | |
46 | - | |
47 | 45 | if [ ! -d "$RemoteData/PARAMS" ]; then |
48 | - sudo mkdir -m 775 -p $RemoteData/PARAMS | |
46 | + mkdir -m 775 -p $RemoteData/PARAMS | |
49 | 47 | fi |
50 | 48 | |
51 | - sudo chmod -R g+wrx $RemoteData/PARAMS | |
52 | - sudo chmod -R g+wrx $PARAMS_LOCALDB_DIR | |
49 | + # group = apache ! | |
50 | + sudo chmod -R g+wrx $RemoteData $RemoteData/PARAMS $PARAMS_LOCALDB_DIR | |
53 | 51 | |
54 | 52 | php $AMDA_IHM/php/RemoteDataCenter/getRemoteDDBaseProxies.php |
55 | 53 | |
56 | 54 | # copy "DDBASE" Remote Params descriptions |
57 | 55 | if [ -d "$RemoteData/PARAMS" ]; then |
58 | - cp $AMDA_IHM/generic_data/RemoteData/PARAMS/* $PARAMS_LOCALDB_DIR/ | |
56 | + for param_def in $RemoteData/PARAMS/*.xml | |
57 | + do | |
58 | + xml=`basename $param_def` | |
59 | + if [ ! -f "$PARAMS_LOCALDB_DIR/$xml" ]; then | |
60 | + cp $param_def $PARAMS_LOCALDB_DIR/ | |
61 | + fi | |
62 | + done | |
59 | 63 | fi |
60 | 64 | |
... | ... |