From d97e4c801e14597d070813be15073bb2257c101d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 8 Aug 2026 21:48:53 +0200 Subject: typora-bin: fix root-only install directory Upstream ships its top directory as 0700. The standard SBo perm-normalize block only remaps the modes it enumerates (777/775/750/711/555/511 and the 6xx/4xx file set), so 0700 passed through untouched and the whole tree installed root-only. Launching as a normal user died with "Permission denied" on the binary. Normalize every directory to 755 explicitly, before the chrome-sandbox chmod so the setuid bit is unaffected. BUILD bumped so the fixed package supersedes the broken one. Worth noting for other repacks: neither sbopkglint nor a container build catches this, both run as root, where 0700 is traversable. Verified here by extracting the package as a normal user and launching the real binary. Co-Authored-By: Claude Opus 5 --- typora-bin/typora-bin.SlackBuild | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/typora-bin/typora-bin.SlackBuild b/typora-bin/typora-bin.SlackBuild index c8788e1..2e5110f 100644 --- a/typora-bin/typora-bin.SlackBuild +++ b/typora-bin/typora-bin.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=typora-bin SRCNAM=Typora VERSION=${VERSION:-1.14.9} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -142,6 +142,14 @@ find -L $PKG \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ +# Every directory must be world-traversable. The block above only remaps the +# modes it lists, and upstream ships its top directory (and some below it) as +# 0700, which is in neither list and so passes through untouched. That leaves +# the tree readable only by root, and a non-root launch dies with "Permission +# denied" on the binary. Root-run lint and root-run builds cannot see this, +# since 0700 is traversable by root. +find $PKG -type d -exec chmod 755 {} \+ + # chrome-sandbox needs setuid root (4755) for Chromium's SUID sandbox. Set it # LAST, after the find -L perm-normalize above would otherwise strip it. chmod 4755 $PKG$APPDIR/chrome-sandbox -- cgit v1.2.3