Kaynağa Gözat

Merge pull request #95 from elrido/rugk-permissions

Set permissions when saving files
El RIDO 10 yıl önce
ebeveyn
işleme
46d32948f1
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      lib/persistence.php

+ 1 - 0
lib/persistence.php

@@ -119,6 +119,7 @@ abstract class persistence
         if ($writtenBytes === false || $writtenBytes < strlen($data)) {
         if ($writtenBytes === false || $writtenBytes < strlen($data)) {
             throw new Exception('unable to write to file ' . $file, 13);
             throw new Exception('unable to write to file ' . $file, 13);
         }
         }
+        @chmod($file, 0640); // protect file access
         return $file;
         return $file;
     }
     }
 }
 }