From 273a2973e03ff166b7146e2ef67a361c1e1effe0 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sat, 6 Jun 2026 16:26:26 -0400 Subject: [PATCH] =?UTF-8?q?Ignore=20vanished-file=20chmod=20errors=20in=20?= =?UTF-8?q?Temp=5FStorage=20=E2=80=94=20race=20condition=20with=20Emby=20t?= =?UTF-8?q?ranscodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Media/media_shares_permissions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Media/media_shares_permissions.sh b/Media/media_shares_permissions.sh index 8d62683..dfc9727 100755 --- a/Media/media_shares_permissions.sh +++ b/Media/media_shares_permissions.sh @@ -169,8 +169,10 @@ for SHARE in "${MEDIA_PERMISSION_SHARES[@]}"; do 2>/dev/null || CHMOD_DIR_OK=false # Apply file permissions — no execute bit on media files - find "$SHARE" -type f -exec chmod "${PERMISSIONS_FILE_MODE:-664}" {} + \ - 2>/dev/null || CHMOD_FILE_OK=false + # Ignore "No such file" errors: race condition with volatile dirs (e.g. Emby transcodes) + _chmod_errs=$(find "$SHARE" -type f -exec chmod "${PERMISSIONS_FILE_MODE:-664}" {} + 2>&1 | \ + grep -v "No such file or directory" | grep -c "chmod:" || true) + [[ "$_chmod_errs" -gt 0 ]] && CHMOD_FILE_OK=false if [[ "$CHMOD_DIR_OK" == true && \ "$CHMOD_FILE_OK" == true && \