aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-07 00:26:00 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-07 00:26:00 +0000
commit48cc34bfa7bb3c766c2947adb51d364633557e8a (patch)
treed55642f6804af50d0c267afd7a1d15bc3574a7ee /package/base-files/files/lib/functions
parenta5fa9a2647abb068b44128163b3a966c6df094df (diff)
downloadupstream-48cc34bfa7bb3c766c2947adb51d364633557e8a.tar.gz
upstream-48cc34bfa7bb3c766c2947adb51d364633557e8a.tar.bz2
upstream-48cc34bfa7bb3c766c2947adb51d364633557e8a.zip
[PATCH] Fix permissions for /etc and other dirs after clean flash (#6039)
During the first OpenWrt boot after a clean flash (when the jffs2 partition is not yet initialized) tmpfs is used instead of the usual jffs2 overlay filesystem. If this tmpfs is mounted with default options, all directories created there (/etc, /etc/config, other subdirectories in /etc) get permissions 1777 by default, and these permissions then persist in the created jffs2 at least until subsequent sysupgrade. Mounting tmpfs with mode=0755 fixes the permission problem. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23906 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib/functions')
-rw-r--r--package/base-files/files/lib/functions/boot.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh
index fc93eba49d..66423d9aad 100644
--- a/package/base-files/files/lib/functions/boot.sh
+++ b/package/base-files/files/lib/functions/boot.sh
@@ -142,7 +142,7 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
ramoverlay() {
mkdir -p /tmp/root
- mount -t tmpfs root /tmp/root
+ mount -t tmpfs -o mode=0755 root /tmp/root
fopivot /tmp/root /rom 1
}