Scanner silently skips NFSv4 ACL-readable music directories due to Perl -r _ check (9.1 / 9.2 dev)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in Slim/Utils/Misc.pm at fileFilter(): lstat($fullpath) fills the cache and -l _/-d _/-r _ read it, so the readable-but-ACL-only case fails. Reproduce with the issue's snippet against an NFSv4 ACL mount and compare with use filetest 'access'. Before changing anything, grep the scanner path for other cached _ tests and look for existing scanner tests to run; done means a read-only ACL-mounted library enumerates and scans tracks instead of reporting zero.
索引モデルが issue の本文から書いたものです。
説明
Title: Music scanner silently skips NFSv4 ACL-accessible directories due to Perl -r _ check (9.1 and 9.2)
Environment
- TrueNAS SCALE 25.10.8, ZFS filesystem with NFSv4 ACLs
- Lyrion Music Server 9.1.1, custom Debian 13 Docker image
- Also reproduced the underlying permission-test discrepancy using official
lmscommunity/lyrionmusicserver:9.2.0-dev - Debian 13, glibc 2.41, Perl 5.40.1
- Music library mounted read-only at
/music - Server runs as a non-root account with supplementary group
music-readers(GID 3006)
Problem
The Lyrion media scanner discovers zero tracks in a readable music collection because its fileFilter() implementation relies on Perl's standard -r _ file test.
The filesystem grants read and directory traversal access through NFSv4 ACLs. Actual filesystem operations succeed, but Perl's standard permission tests report access denied.
Reproduction
Running as the music server's non-root identity:
opendir(my $dh, "/music") or die $!;
my @entries = readdir($dh);
print scalar(@entries), "\n";
print((-r "/music") ? "readable\n" : "not readable\n");
print((-x "/music") ? "traversable\n" : "not traversable\n");
Result:
1656
not readable
not traversable
(The entry count includes . and ...)
The same process can open album subdirectories and read the underlying FLAC files.
Using Perl's ACL-aware file tests:
use filetest 'access';
print((-r "/music") ? "readable\n" : "not readable\n");
print((-x "/music") ? "traversable\n" : "not traversable\n");
Result:
readable
traversable
Observed scanner behavior
The library contains approximately 20,099 FLAC files.
Both Perl File::Find and the bundled File::Next successfully enumerate all 24,135 files.
However, Lyrion's media scan logs show:
Discovering audio files in /music
Scanning new audio files (0)
Completed ... in 0.041 seconds
The scan finishes without reporting an access error.
Suspected cause
In Slim/Utils/Misc.pm, fileFilter() contains:
lstat($fullpath);
return 0 unless (-l _ || -d _ || -f _);
...
return 0 if ! -r _;
The -r _ check evaluates cached stat information, which does not correctly reflect the NFSv4 ACL-granted access in this environment.
The public/9.2 branch still contains this code.
Expected behavior
The scanner should recognize files and directories that the server process can actually read through their filesystem ACLs, rather than silently treating them as inaccessible.
Ideally, the fix would preserve existing access-control behavior without requiring custom patches or changes to the underlying music collection.
Additional context
We have deliberately avoided modifying the Lyrion application code. An upstream solution would be preferable for compatibility with future releases.
Potentially related issue: #1644.
Note: A full media scan has been performed on 9.1.1; the official 9.2 image has reproduced the underlying permission-test discrepancy, but a full 9.2 media scan has not yet been performed.
- 主要言語
- Perl
- スター
- 1.8k
- フォーク
- 389
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LMS-Community/slimserver のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 67/100
LMS-Community/slimserver#1742 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
LMS-Community/slimserver#1555 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
LMS-Community/slimserver#1744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Serve a static FLAC DASH manifest as a FLAC stream対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
LMS-Community/slimserver#1741 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
compatibility
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
LMS-Community/slimserver#1739 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
LMS-Community/slimserver の issue をすべて見る
似ている issue
-
area:cpan-port area:performance bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#2230 ·
メンテナーはふだん 1 日以内に返信
-
Make logo .svgオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
larchanka/ppc-code-ai-agent#38 ·
メンテナーはふだん 1 日以内に返信
-
[doc] perlsub wrongly says that `"sub { ... }" creates a new subroutine each time it is executed'オープンdocumentation Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
docs(api): /api/v3/external_sources spec is missing lc and section_title対応中かも @subhwastaken が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
openfoodfacts/openfoodfacts-server#15626 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100