From 961c8a8c482bfab87fcb412bae2dabe3e4769601 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 7 Oct 2014 13:19:50 +0200 Subject: [PATCH] MT#9425 init: set umask and perms Change-Id: I2a36bebe95c7deb73fb2b5cd8329d51715887171 --- debian/ngcp-sems.init | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/ngcp-sems.init b/debian/ngcp-sems.init index 60aeecee..fd8ed347 100644 --- a/debian/ngcp-sems.init +++ b/debian/ngcp-sems.init @@ -10,6 +10,8 @@ # Short-Description: Start/stop SEMS Application Server ### END INIT INFO +umask 0022 + SEMS_CACHEDIR="/var/cache/ngcp-sems" # read configuration from /etc/default/ngcp-sems file @@ -31,17 +33,17 @@ DESC=ngcp-sems PARAMS="" if ! test -d $SEMS_CACHEDIR ; then - mkdir -p $SEMS_CACHEDIR + mkdir -m 0755 -p $SEMS_CACHEDIR fi for dir in $SEMS_CACHEDIR_EXTRADIRS ; do if ! test -d ${SEMS_CACHEDIR}/${dir} ; then - mkdir -p ${SEMS_CACHEDIR}/${dir} + mkdir -m 0755 -p ${SEMS_CACHEDIR}/${dir} fi done if ! test -d $SEMS_RUNDIR ; then - mkdir -p $SEMS_RUNDIR + mkdir -m 0755 -p $SEMS_RUNDIR fi chown -R $SEMS_USER:$SEMS_GROUP $SEMS_RUNDIR $SEMS_CACHEDIR