Skip to content
Permalink
Browse files

Set "umask 022" for "git clone" and "feed update"

If the openwrt files are fetched using "git" on systems with "umask 002",
they get checked out with group-writable permission. This finally leads
to a "500 internal server error" when accessing luci pages, because of
wrong permissions of /usr/share/acl.d/luci-base.json.

See OpenWrt: "Builds with umask != 022 are known to be broken":
openwrt/luci#1521 (comment)

Bugreport and details, how these wrong permissions end up in the image:
#431

cherry-pick from master (47eedf5)
  • Loading branch information...
torte71 authored and SvenRoederer committed Mar 10, 2018
1 parent 2799b29 commit 83cad9fb046cf4f3ee1e5cddf3717e1e860ab296
Showing with 3 additions and 2 deletions.
  1. +3 −2 Makefile
@@ -56,7 +56,8 @@ default: firmwares

# clone openwrt
$(OPENWRT_DIR):
git clone $(OPENWRT_SRC) $(OPENWRT_DIR)
$(UMASK); \
git clone $(OPENWRT_SRC) $(OPENWRT_DIR)

# clean up openwrt working copy
openwrt-clean: stamp-clean-openwrt-cleaned .stamp-openwrt-cleaned
@@ -89,7 +90,7 @@ $(OPENWRT_DIR)/feeds.conf: .stamp-openwrt-updated feeds.conf
feeds-update: stamp-clean-feeds-updated .stamp-feeds-updated
.stamp-feeds-updated: $(OPENWRT_DIR)/feeds.conf unpatch
cd $(OPENWRT_DIR); ./scripts/feeds uninstall -a
cd $(OPENWRT_DIR); ./scripts/feeds update
$(UMASK); cd $(OPENWRT_DIR); ./scripts/feeds update
cd $(OPENWRT_DIR); ./scripts/feeds install -a
touch $@

0 comments on commit 83cad9f

Please sign in to comment.
You can’t perform that action at this time.