diff --git a/scripts/finalize-appimage.sh b/scripts/finalize-appimage.sh index c7c3385..ed4e41d 100755 --- a/scripts/finalize-appimage.sh +++ b/scripts/finalize-appimage.sh @@ -281,11 +281,13 @@ if [ "$demoted" = true ]; then fi [ -x "$out/usr/bin/triple-c" ] || fail "no executable usr/bin/triple-c." -# Every entry readable by all, every directory and program executable by all — -# what the `chmod -R a+rX` before the repack promised. A 0700 root here is an -# image other users of the machine cannot start. -unreadable="$(find "$out" ! -type l \( ! -perm -a+r -o \( -type d ! -perm -a+x \) \ - -o \( -type f -perm /111 ! -perm -a+x \) \) -print -quit)" +# Every file readable by all, every program executable by all — what the +# `chmod -R a+rX` before the repack promised (AppRun.wrapped used to ship 0770). +# Files only: the AppImage runtime's --appimage-extract creates every +# *directory* 0700 whatever the image stores (verified by packing a 0755 +# AppDir and extracting it under umask 022), so directory modes cannot be +# checked from an extraction. appimagetool's own check covers them pre-pack. +unreadable="$(find "$out" -type f \( ! -perm -a+r -o \( -perm /111 ! -perm -a+x \) \) -print -quit)" [ -z "$unreadable" ] || fail "${unreadable#"$out"/} is not readable/executable by all users." # An empty Categories or missing metadata ships an image a manager cannot file