|
...
|
...
|
@@ -34,8 +34,13 @@ class LogFormatterFactory |
|
|
|
$path = storage_path($path);
|
|
|
|
|
|
|
|
try {
|
|
|
|
$owner = posix_getpwuid(fileowner($path));
|
|
|
|
if($owner['name'] !== 'www'){
|
|
|
|
if (!file_exists($path)) {
|
|
|
|
$directory = pathinfo($path, PATHINFO_DIRNAME);
|
|
|
|
if(!file_exists($directory)){
|
|
|
|
mkdir($directory, 0644, true);
|
|
|
|
chown($directory, 'www');
|
|
|
|
}
|
|
|
|
touch($path);
|
|
|
|
chown($path, 'www');
|
|
|
|
}
|
|
|
|
}catch (\Throwable $exception){}
|
...
|
...
|
|