Skip to content

Commit 2c31001

Browse files
committed
Less noise
1 parent cbb4377 commit 2c31001

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/Actions/Diagnostics/Pipes/Checks/BasicPermissionCheck.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class BasicPermissionCheck implements DiagnosticPipe
3838
{
3939
public const MAX_ISSUE_REPORTS_PER_TYPE = 5;
4040
public const READ_WRITE_ALL = 07777;
41+
public const WITHOUT_STICKY_BIT = 0777;
4142

4243
/**
4344
* @var int[] IDs of all (POSIX) groups to which the process belongs
@@ -219,7 +220,9 @@ private function checkDirectoryPermissionsRecursively(string $path, array &$data
219220
// `fileperms` also returns the higher bits of the inode mode.
220221
// Hence, we must AND it with 07777 to only get what we are
221222
// interested in
222-
$actual_perm &= self::READ_WRITE_ALL;
223+
224+
// Edit 2026-01-23: Ignore sticky bit in permission checks
225+
$actual_perm &= self::WITHOUT_STICKY_BIT;
223226
$owning_group_id_or_false = filegroup($path);
224227
if ($owning_group_id_or_false !== false) {
225228
try {
@@ -236,7 +239,7 @@ private function checkDirectoryPermissionsRecursively(string $path, array &$data
236239
}
237240
/** @var string $owning_group_name */
238241
$owning_group_name = $owning_group_name_or_false === false ? '<unknown>' : $owning_group_name_or_false['name'];
239-
$expected_perm = self::getConfiguredDirectoryPerm();
242+
$expected_perm = self::WITHOUT_STICKY_BIT & self::getConfiguredDirectoryPerm();
240243

241244
if (!in_array($owning_group_id_or_false, $this->groupIDs, true)) {
242245
// @codeCoverageIgnoreStart

app/Actions/Diagnostics/Pipes/Checks/DBSupportCheck.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function handle(array &$data, \Closure $next): array
3131
if (!array_key_exists(config('database.default', 'sqlite'), $db_possibilities)) {
3232
// @codeCoverageIgnoreStart
3333
$data[] = DiagnosticData::error('database type ' . config('database.default', 'sqlite') . ' is not supported by Lychee', self::class);
34+
3435
return $next($data);
3536
}
3637
// @codeCoverageIgnoreEnd
@@ -41,7 +42,7 @@ public function handle(array &$data, \Closure $next): array
4142
}
4243
if (!$found) {
4344
// @codeCoverageIgnoreStart
44-
$data[] = DiagnosticData::error(config('database.default', 'sqlite') . ' db driver selected and PHP ' . join(" or ",$db_possibility[config('database.default', 'sqlite')]) . ' extensions not activated', self::class);
45+
$data[] = DiagnosticData::error(config('database.default', 'sqlite') . ' db driver selected and PHP ' . implode(' or ', $db_possibility[config('database.default', 'sqlite')]) . ' extensions not activated', self::class);
4546
// @codeCoverageIgnoreEnd
4647
}
4748

0 commit comments

Comments
 (0)