From: Jo-Philipp Wich Date: Sun, 7 Nov 2010 00:26:00 +0000 (+0000) Subject: Fix permissions for /etc and other dirs after clean flash (#6039) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a8efa34da327fb00d25d642f445d72af06362d8a;p=openwrt%2Fstaging%2Fsvanheule.git 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 SVN-Revision: 23906 --- 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() { # 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 }