Ignore vanished-file chmod errors in Temp_Storage — race condition with Emby transcodes

This commit is contained in:
Gmer4Lfe
2026-06-06 16:26:26 -04:00
parent 57773bcaf5
commit 273a2973e0
+4 -2
View File
@@ -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 && \