Skip to content

Commit af6954f

Browse files
committed
Fixed: FS#978 - Permissions of the passwd file for stats are wrong
1 parent f780d7e commit af6954f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,15 +813,15 @@ function update($event_name,$data) {
813813
if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats');
814814
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\nrequire valid-user";
815815
file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file);
816-
chmod($data["new"]["document_root"].'/web/stats/.htaccess',0664);
816+
chmod($data["new"]["document_root"].'/web/stats/.htaccess',0755);
817817
unset($ht_file);
818818
}
819819

820820
if(!is_file($data["new"]["document_root"].'/.htpasswd_stats') || $data["new"]["stats_password"] != $data["old"]["stats_password"]) {
821821
if(trim($data["new"]["stats_password"]) != '') {
822822
$htp_file = 'admin:'.trim($data["new"]["stats_password"]);
823823
file_put_contents($data["new"]["document_root"].'/.htpasswd_stats',$htp_file);
824-
chmod($data["new"]["document_root"].'/.htpasswd_stats',0664);
824+
chmod($data["new"]["document_root"].'/.htpasswd_stats',0755);
825825
unset($htp_file);
826826
}
827827
}

0 commit comments

Comments
 (0)