From 73449c4f1c2cd9f3e55e2fdb4d0b90067edd3ea2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 12 Aug 2014 17:15:27 +0200 Subject: rc.S: fix permissions on a few /var directories During the init process, some of the directories in /var might be created with restrictive permissions (eg: mk-flash-layout might create /var/state in 700). Let's fix permissions for the relevant ones before starting services. --- sbin/rc.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/rc.S b/sbin/rc.S index b873c7c..39f64cb 100755 --- a/sbin/rc.S +++ b/sbin/rc.S @@ -23,6 +23,9 @@ function build_var { if [ ! -d /var/empty ] ; then mkdir /var/empty ; chmod 100 /var/empty; fi if [ ! -d /var/adm/. ] ; then ln -s log /var/adm ; fi + # ensure proper rights are set + chmod 755 /var/run /var/state /var/lib /var/spool /var/cache /var/adm >/dev/null 2>&1 + sync } -- 1.7.12.1