Skip to content

Commit 93bd593

Browse files
committed
Install: replace is_writable() by touch()
is_writable() is not reliable for a folder on NFS. Follow-up of FreshRSS#4780 Maybe fix for FreshRSS#7624
1 parent b606833 commit 93bd593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/install.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ function freshrss_already_installed(): bool {
318318

319319
/** @return array<string,string> */
320320
function checkStep2(): array {
321-
$conf = is_writable(join_path(DATA_PATH, 'config.php'));
321+
$conf = touch(DATA_PATH . '/config.php'); // is_writable() is not reliable for a folder on NFS
322322

323323
$bd = Minz_Session::paramString('bd_type') != '';
324324
$conn = Minz_Session::paramString('bd_error') == '';
@@ -341,7 +341,7 @@ function checkStep3(): array {
341341
if ($defaultUser === '') {
342342
$defaultUser = Minz_Session::paramString('default_user') == '' ? '' : Minz_Session::paramString('default_user');
343343
}
344-
$data = is_writable(USERS_PATH . '/' . $defaultUser . '/config.php');
344+
$data = touch(USERS_PATH . '/' . $defaultUser . '/config.php'); // is_writable() is not reliable for a folder on NFS
345345

346346
return [
347347
'conf' => $conf ? 'ok' : 'ko',

0 commit comments

Comments
 (0)