diff --git a/admin/php/admin.php b/admin/php/admin.php index a88da59..0c9d4f4 100755 --- a/admin/php/admin.php +++ b/admin/php/admin.php @@ -38,8 +38,8 @@ if(!isset($locaplic) || !isset($dir_tmp)){ include(dirname(__FILE__)."/../../ms_configura.php"); } if(!file_exists($dir_tmp)){ - @mkdir ($dir_tmp,0777); - chmod($dir_tmp,0777); + @mkdir ($dir_tmp,0774); + chmod($dir_tmp,0774); } include_once($locaplic."/classesphp/pega_variaveis.php"); error_reporting(0); diff --git a/admin/php/conexao.php b/admin/php/conexao.php index 051229a..4abe071 100755 --- a/admin/php/conexao.php +++ b/admin/php/conexao.php @@ -65,7 +65,7 @@ if(!isset($logTransacoes)){ $convUTF = true; if($conexaoadmin == ""){ $arquivosqlite = $locaplic."/admin/admin.db"; - chmod($arquivosqlite,0777); + chmod($arquivosqlite,0774); //echo $arquivosqlite;exit; if(!file_exists($arquivosqlite)){ echo "O arquivo admin.db não existe. Utilize i3geo/admin/criabanco.php para criar o banco de dados SQLITE."; diff --git a/admin/php/editormapfile.php b/admin/php/editormapfile.php index b930e54..935dab6 100755 --- a/admin/php/editormapfile.php +++ b/admin/php/editormapfile.php @@ -2466,7 +2466,7 @@ function removeCabecalho($arq,$symbolset=true) $nomeMapfileTmp = $dir_tmp."/ogc_".md5($arq).".map"; $nomeMapfileTmp = str_replace(",","",$nomeMapfileTmp); $nomeMapfileTmp = str_replace(" ","",$nomeMapfileTmp); - chmod($nomeMapfileTmp,0777); + chmod($nomeMapfileTmp,0774); unlink($nomeMapfileTmp); //echo $nomeMapfileTmp;exit; //remove o cache OGC @@ -2537,11 +2537,11 @@ function removeCabecalho($arq,$symbolset=true) } function rrmdir($dir) { if (is_dir($dir)) { - chmod($dir,0777); + chmod($dir,0774); $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { - chmod($dir."/".$object,0777); + chmod($dir."/".$object,0774); if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); } } diff --git a/admin/php/estat_mapa_upload.php b/admin/php/estat_mapa_upload.php index 3f96d25..d9bfd80 100755 --- a/admin/php/estat_mapa_upload.php +++ b/admin/php/estat_mapa_upload.php @@ -33,7 +33,7 @@ if (isset($_FILES['uploadimagem']['name'])){ {echo "

Ocorreu um erro no envio do arquivo. Verifique as permissoes de escrita";exit;} if($status == 1){ echo "

Arquivo enviado.

"; - chmod($arq,0777); + chmod($arq,0774); } else{ echo "

Erro ao enviar o arquivo.

"; @@ -56,4 +56,4 @@ function verificaNome($nome) } ?> - \ No newline at end of file + diff --git a/classesjs/compactajs.php b/classesjs/compactajs.php index bc7174f..1d09742 100755 --- a/classesjs/compactajs.php +++ b/classesjs/compactajs.php @@ -365,7 +365,7 @@ function packer($src,$out,$tipo="None") $time = sprintf('%.4f', ($t2 - $t1) ); echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n"; file_put_contents($out, $packed); - chmod($out,0777); + chmod($out,0774); } function salvatudojs($jsfiles,$buffer,$final,$tipo) { @@ -409,7 +409,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) $fecha = fclose ($abre); - chmod($final,0777); + chmod($final,0774); //gzip $abre = fopen($final, "r"); if ($tipo == "js") @@ -424,7 +424,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) $abre = fopen($final.".php", "wt"); $escreve = fwrite ($abre,$buffer); $fecha = fclose ($abre); - chmod($final.".php",0777); + chmod($final.".php",0774); } ?>

Notas importantes:

diff --git a/classesjs/compactajs_closurecompiler.php b/classesjs/compactajs_closurecompiler.php index 317f941..f82bec9 100755 --- a/classesjs/compactajs_closurecompiler.php +++ b/classesjs/compactajs_closurecompiler.php @@ -106,7 +106,7 @@ foreach($lista as $l){ $saida = shell_exec("java -jar {$java} --warning_level DEFAULT --js {$input} --js_output_file {$output}"); echo "
".$saida."
"; unlink($input); - chmod($output,0777); + chmod($output,0774); } @@ -235,7 +235,7 @@ foreach ($cssfiles as $f) $abre = fopen("../css/i3geo_ferramentas6.css", "wt"); $escreve = fwrite ($abre,$buffer); $fecha = fclose ($abre); -chmod("../css/i3geo_ferramentas6.css",0777); +chmod("../css/i3geo_ferramentas6.css",0774); // //compacta os codigos para o Mashup do OpenLayers // @@ -322,7 +322,7 @@ function packer($src,$out,$tipo="None") $time = sprintf('%.4f', ($t2 - $t1) ); echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n"; file_put_contents($out, $packed); - chmod($out,0777); + chmod($out,0774); } function removeconsole($src,$out,$tipo="None") { @@ -372,7 +372,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) $fecha = fclose ($abre); - chmod($final,0777); + chmod($final,0774); //gzip $abre = fopen($final, "r"); if ($tipo == "js") @@ -387,6 +387,6 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) $abre = fopen($final.".php", "wt"); $escreve = fwrite ($abre,$buffer); $fecha = fclose ($abre); - chmod($final.".php",0777); + chmod($final.".php",0774); } ?> diff --git a/classesphp/mapa_googlemaps.php b/classesphp/mapa_googlemaps.php index 99ddf47..1798a2b 100755 --- a/classesphp/mapa_googlemaps.php +++ b/classesphp/mapa_googlemaps.php @@ -482,7 +482,7 @@ function salvaCacheImagem(){ } $c = $cachedir."/googlemaps/$layer/$z/$x"; if(!file_exists($c."/$y.png")){ - mkdir($cachedir."/googlemaps/$layer/$z/$x",0777,true); + mkdir($cachedir."/googlemaps/$layer/$z/$x",0774,true); $img->saveImage($c."/$y.png"); // //corta a imagem gerada para voltar ao tamanho normal @@ -491,8 +491,8 @@ function salvaCacheImagem(){ $img = cortaImagemDisco($c."/$y.png",$cortePixels,256); } - chmod($cachedir."/googlemaps/$layer/$z/$x",0777); - chmod($c."/$y.png",0777); + chmod($cachedir."/googlemaps/$layer/$z/$x",0774); + chmod($c."/$y.png",0774); } return $c."/$y.png"; } diff --git a/classesphp/mapa_googlemaps_alternativo.php b/classesphp/mapa_googlemaps_alternativo.php index b438292..ad60659 100755 --- a/classesphp/mapa_googlemaps_alternativo.php +++ b/classesphp/mapa_googlemaps_alternativo.php @@ -323,9 +323,9 @@ function salvaCacheImagem(){ } $c = $cachedir."/googlemaps/$layer/$z/$x"; if(!file_exists($c."/$y.png")){ - mkdir($cachedir."/googlemaps/$layer/$z/$x",0777,true); + mkdir($cachedir."/googlemaps/$layer/$z/$x",0774,true); $img->saveImage($c."/$y.png"); - chmod($c."/$y.png",0777); + chmod($c."/$y.png",0774); } return $nome; } @@ -444,4 +444,4 @@ function versaoMS() $versao["principal"] = $v[0]; return $versao; } -?> \ No newline at end of file +?> diff --git a/classesphp/mapa_openlayers.php b/classesphp/mapa_openlayers.php index 4461634..3908aaf 100755 --- a/classesphp/mapa_openlayers.php +++ b/classesphp/mapa_openlayers.php @@ -494,8 +494,8 @@ function salvaCacheImagem($cachedir,$map,$tms){ $nome = $cachedir.$tms; } if(!file_exists($nome)){ - @mkdir(dirname($nome),0777,true); - chmod(dirname($nome),0777); + @mkdir(dirname($nome),0774,true); + chmod(dirname($nome),0774); $img->saveImage($nome); // //corta a imagem gerada para voltar ao tamanho normal @@ -503,7 +503,7 @@ function salvaCacheImagem($cachedir,$map,$tms){ if($cortePixels > 0){ $img = cortaImagemDisco($nome,$cortePixels,256); } - chmod($nome,0777); + chmod($nome,0774); } return $nome; } diff --git a/ferramentas/congelamapa/openlayers.php b/ferramentas/congelamapa/openlayers.php index 0ae3abb..5a4a1e7 100755 --- a/ferramentas/congelamapa/openlayers.php +++ b/ferramentas/congelamapa/openlayers.php @@ -15,7 +15,7 @@ $base = basename($map_file); $dir = dirname($map_file); $novo_mapfile = $dir."/".nomeRandomico(5).$base; copy($map_file,$novo_mapfile); -chmod($novo_mapfile,0777); +chmod($novo_mapfile,0774); $mapa = ms_newMapObj($novo_mapfile); $mapa->setProjection(pegaProjecaoDefault("proj4")); $numlayers = $mapa->numlayers; @@ -95,4 +95,4 @@ for(i=0;i - \ No newline at end of file + diff --git a/ferramentas/congelamapa/openlayers3.php b/ferramentas/congelamapa/openlayers3.php index d81db47..ea1183b 100755 --- a/ferramentas/congelamapa/openlayers3.php +++ b/ferramentas/congelamapa/openlayers3.php @@ -15,7 +15,7 @@ $base = basename($map_file); $dir = dirname($map_file); $novo_mapfile = $dir."/".nomeRandomico(5).$base; copy($map_file,$novo_mapfile); -chmod($novo_mapfile,0777); +chmod($novo_mapfile,0774); $mapa = ms_newMapObj($novo_mapfile); $mapa->setProjection(pegaProjecaoDefault("proj4")); $numlayers = $mapa->numlayers; @@ -83,4 +83,4 @@ var v = mapa.getView(); v.fit([], mapa.getSize()); - \ No newline at end of file + diff --git a/ferramentas/melhorcaminho/exec.php b/ferramentas/melhorcaminho/exec.php index 4a440fe..57cd4fc 100755 --- a/ferramentas/melhorcaminho/exec.php +++ b/ferramentas/melhorcaminho/exec.php @@ -50,7 +50,7 @@ switch (strtoupper($funcao)) if(file_exists($cost_surface_path)){ $pathresult = $dir_tmp."/melhorcaminho_".nomeRandomico(); //cria a pasta onde os resultados serao armazenados - mkdir ($pathresult,0777); + mkdir ($pathresult,0774); //parametros para o calculo de melhor caminho e linha reta $best = array( @@ -238,4 +238,4 @@ if (!connection_aborted()){ else{ exit(); } -?> \ No newline at end of file +?> diff --git a/ferramentas/parametrossql/ogc.php b/ferramentas/parametrossql/ogc.php index 7dc9cb5..989b3b8 100755 --- a/ferramentas/parametrossql/ogc.php +++ b/ferramentas/parametrossql/ogc.php @@ -537,8 +537,8 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){ else{ $nome = $cachedir.$tms; } - @mkdir(dirname($nome),0777,true); - chmod(dirname($nome),0777); + @mkdir(dirname($nome),0774,true); + chmod(dirname($nome),0774); $img->saveImage($nome); // //corta a imagem gerada para voltar ao tamanho normal @@ -555,7 +555,7 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){ imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256); imagepng($imgc,$nome); } - chmod($nome,0777); + chmod($nome,0774); header('Content-Length: '.filesize($nome)); header('Content-Type: image/png'); header('Cache-Control: max-age=3600, must-revalidate'); diff --git a/init/index.php b/init/index.php index 2f36faf..bef5c82 100755 --- a/init/index.php +++ b/init/index.php @@ -21,16 +21,16 @@ if (! empty ( $_GET ["customDir"] )) { $customDir = "interface"; } if (! file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp, 0777 ); + @mkdir ( $dir_tmp, 0774 ); } if (file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp . "/comum", 0777 ); - @mkdir ( $dir_tmp . "/saiku-datasources", 0777 ); - chmod ( $dir_tmp . "/saiku-datasources", 0777 ); - @mkdir ( $dir_tmp . "/cache", 0777 ); - chmod ( $dir_tmp . "/cache", 0777 ); - @mkdir ( $dir_tmp . "/cache/googlemaps", 0777 ); - chmod ( $dir_tmp . "/cache/googlemaps", 0777 ); + @mkdir ( $dir_tmp . "/comum", 0774 ); + @mkdir ( $dir_tmp . "/saiku-datasources", 0774 ); + chmod ( $dir_tmp . "/saiku-datasources", 0774 ); + @mkdir ( $dir_tmp . "/cache", 0774 ); + chmod ( $dir_tmp . "/cache", 0774 ); + @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 ); + chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); } error_reporting ( 0 ); include "head.php"; diff --git a/init/remover.php b/init/remover.php index eff5318..122d35b 100755 --- a/init/remover.php +++ b/init/remover.php @@ -36,8 +36,8 @@ if(file_exists("../index.htm") || file_exists("../index.html")){ } copy("_index.htm","../index.htm"); copy("_index.html","../index.html"); -chmod("../index.htm",0777); -chmod("../index.html",0777); +chmod("../index.htm",0774); +chmod("../index.html",0774); echo "
OK. Removido. Voce pode utilizar o init digitando i3geo/init no navegador"; ?> diff --git a/mapas/index.php b/mapas/index.php index ecdf3aa..f72eaa5 100755 --- a/mapas/index.php +++ b/mapas/index.php @@ -7,16 +7,16 @@ if (! empty ( $_GET ["customDir"] )) { $customDir = "interface"; } if (! file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp, 0777 ); + @mkdir ( $dir_tmp, 0774 ); } if (file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp . "/comum", 0777 ); - @mkdir ( $dir_tmp . "/saiku-datasources", 0777 ); - chmod ( $dir_tmp . "/saiku-datasources", 0777 ); - @mkdir ( $dir_tmp . "/cache", 0777 ); - chmod ( $dir_tmp . "/cache", 0777 ); - @mkdir ( $dir_tmp . "/cache/googlemaps", 0777 ); - chmod ( $dir_tmp . "/cache/googlemaps", 0777 ); + @mkdir ( $dir_tmp . "/comum", 0774 ); + @mkdir ( $dir_tmp . "/saiku-datasources", 0774 ); + chmod ( $dir_tmp . "/saiku-datasources", 0774 ); + @mkdir ( $dir_tmp . "/cache", 0774 ); + chmod ( $dir_tmp . "/cache", 0774 ); + @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 ); + chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); } error_reporting ( 0 ); include "../init/head.php"; diff --git a/mashups/openlayers.php b/mashups/openlayers.php index e54f240..1206c36 100755 --- a/mashups/openlayers.php +++ b/mashups/openlayers.php @@ -11,16 +11,16 @@ include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); error_reporting(0); //cria as pastas temporarias caso nao existam if (! file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp, 0777 ); + @mkdir ( $dir_tmp, 0774 ); } if (file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp . "/comum", 0777 ); - @mkdir ( $dir_tmp . "/saiku-datasources", 0777 ); - chmod ( $dir_tmp . "/saiku-datasources", 0777 ); - @mkdir ( $dir_tmp . "/cache", 0777 ); - chmod ( $dir_tmp . "/cache", 0777 ); - @mkdir ( $dir_tmp . "/cache/googlemaps", 0777 ); - chmod ( $dir_tmp . "/cache/googlemaps", 0777 ); + @mkdir ( $dir_tmp . "/comum", 0774 ); + @mkdir ( $dir_tmp . "/saiku-datasources", 0774 ); + chmod ( $dir_tmp . "/saiku-datasources", 0774 ); + @mkdir ( $dir_tmp . "/cache", 0774 ); + chmod ( $dir_tmp . "/cache", 0774 ); + @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 ); + chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); } //variaveis utilizadas $parurl = array_merge($_GET,$_POST); diff --git a/mashups/osm.php b/mashups/osm.php index 792f60e..46abbe7 100755 --- a/mashups/osm.php +++ b/mashups/osm.php @@ -11,16 +11,16 @@ include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); error_reporting(0); //cria as pastas temporarias caso nao existam if (! file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp, 0777 ); + @mkdir ( $dir_tmp, 0774 ); } if (file_exists ( $dir_tmp )) { - @mkdir ( $dir_tmp . "/comum", 0777 ); - @mkdir ( $dir_tmp . "/saiku-datasources", 0777 ); - chmod ( $dir_tmp . "/saiku-datasources", 0777 ); - @mkdir ( $dir_tmp . "/cache", 0777 ); - chmod ( $dir_tmp . "/cache", 0777 ); - @mkdir ( $dir_tmp . "/cache/googlemaps", 0777 ); - chmod ( $dir_tmp . "/cache/googlemaps", 0777 ); + @mkdir ( $dir_tmp . "/comum", 0774 ); + @mkdir ( $dir_tmp . "/saiku-datasources", 0774 ); + chmod ( $dir_tmp . "/saiku-datasources", 0774 ); + @mkdir ( $dir_tmp . "/cache", 0774 ); + chmod ( $dir_tmp . "/cache", 0774 ); + @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 ); + chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); } //variaveis utilizadas $parurl = array_merge($_GET,$_POST); diff --git a/ms_criamapa.php b/ms_criamapa.php index 3e5a803..34517de 100755 --- a/ms_criamapa.php +++ b/ms_criamapa.php @@ -1366,33 +1366,33 @@ Retorno: function criaDirMapa($dir_tmp,$cachedir="") { if(!file_exists($dir_tmp)){ - @mkdir ($dir_tmp,0777); + @mkdir ($dir_tmp,0774); } if(file_exists($dir_tmp)) { $tmpdirname = nomeRandomico(); - $crdir = @mkdir ($dir_tmp."/".$tmpdirname,0777); - chmod($dir_tmp."/".$tmpdirname,0777); - $crdiri = @mkdir ($dir_tmp."/img".$tmpdirname,0777); - chmod($dir_tmp."/img".$tmpdirname,0777); + $crdir = @mkdir ($dir_tmp."/".$tmpdirname,0774); + chmod($dir_tmp."/".$tmpdirname,0774); + $crdiri = @mkdir ($dir_tmp."/img".$tmpdirname,0774); + chmod($dir_tmp."/img".$tmpdirname,0774); $mapfile = $dir_tmp."/".$tmpdirname."/".$tmpdirname.".map"; $tmpimgname = "img".$tmpdirname; - @mkdir($dir_tmp."/comum",0777); + @mkdir($dir_tmp."/comum",0774); //utilizado para armazenar os arquivos de fonte de dados do SAIKU - @mkdir($dir_tmp."/saiku-datasources",0777); - chmod($dir_tmp."/saiku-datasources",0777); + @mkdir($dir_tmp."/saiku-datasources",0774); + chmod($dir_tmp."/saiku-datasources",0774); // if($cachedir == ""){ - @mkdir($dir_tmp."/cache",0777); - chmod($dir_tmp."/cache",0777); - @mkdir($dir_tmp."/cache/googlemaps",0777); - chmod($dir_tmp."/cache/googlemaps",0777); + @mkdir($dir_tmp."/cache",0774); + chmod($dir_tmp."/cache",0774); + @mkdir($dir_tmp."/cache/googlemaps",0774); + chmod($dir_tmp."/cache/googlemaps",0774); } else{ - @mkdir($cachedir,0777); - chmod($cachedir,0777); - @mkdir($cachedir."/googlemaps",0777); - chmod($cachedir."/googlemaps",0777); + @mkdir($cachedir,0774); + chmod($cachedir,0774); + @mkdir($cachedir."/googlemaps",0774); + chmod($cachedir."/googlemaps",0774); } if(file_exists($dir_tmp."/".$tmpdirname)) return array($mapfile,$tmpdirname,$tmpimgname); -- libgit2 0.21.2