From c3cc47bb40991f8b4913e1445532fd413e0d7c26 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 31 Dec 2025 13:14:38 +0100 Subject: [PATCH] fix(secubox): remove directories from PKG_FILE_MODES to fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build was failing with: chown: cannot access '/usr/share/secubox': No such file or directory This happened because PKG_FILE_MODES was trying to set permissions on directories that don't exist at the time file modes are applied during package creation. Solution: - Removed all directory entries from PKG_FILE_MODES - Removed apps.json file entry (INSTALL_DATA sets 644 automatically) - Kept only executable files that need explicit 755 permissions How it works now: - $(INSTALL_DIR) automatically creates directories with 755 permissions - $(INSTALL_DATA) automatically installs files with 644 permissions - PKG_FILE_MODES only specifies exceptions (executable scripts = 755) - postinst script sets permissions again as safety measure This follows OpenWrt package best practices where PKG_FILE_MODES should only specify permissions that differ from the defaults set by the installation macros. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- luci-app-secubox/Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/luci-app-secubox/Makefile b/luci-app-secubox/Makefile index 40ec35d4..f53ef30a 100644 --- a/luci-app-secubox/Makefile +++ b/luci-app-secubox/Makefile @@ -15,16 +15,11 @@ LUCI_PKGARCH:=all # Format: path:owner:group:mode # - RPCD scripts: 755 (executable by root, required for ubus calls) # - Helper scripts: 755 (if executable) -# - Config files: 644 (readable by all, writable by root) -# - Data directories: 755 (readable/searchable by all) -# - Data files: 644 (readable by all) +# - Data files: 644 (readable by all - INSTALL_DATA sets this automatically) +# - Directories: 755 (set automatically by INSTALL_DIR) # - CSS/JS files: 644 (set automatically by luci.mk) PKG_FILE_MODES:=/usr/libexec/rpcd/luci.secubox:root:root:755 \ - /usr/libexec/secubox/fix-permissions.sh:root:root:755 \ - /usr/share/secubox:root:root:755 \ - /usr/share/secubox/appstore:root:root:755 \ - /usr/share/secubox/appstore/apps.json:root:root:644 \ - /usr/share/secubox/profiles:root:root:755 + /usr/libexec/secubox/fix-permissions.sh:root:root:755 include $(TOPDIR)/feeds/luci/luci.mk