From d23f2035c194735cffedbdb5f4e599b8e467d3f0 Mon Sep 17 00:00:00 2001 From: Steven Mondji-Lerider Date: Thu, 27 Sep 2012 10:05:25 +0000 Subject: [PATCH] bugfix fixperms (files with spaces) + adding a call in alternc.install --- install/alternc.install | 3 +++ src/fixperms.sh | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/install/alternc.install b/install/alternc.install index d64fec14..0fb6e45f 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -452,5 +452,8 @@ for service in $SERVICES; do test -x /etc/init.d/$service && invoke-rc.d $service start || true done +#launch fixperms +/usr/lib/alternc/fixperms.sh + # hook run-parts --arg=end /usr/lib/alternc/install.d diff --git a/src/fixperms.sh b/src/fixperms.sh index 1b458541..a6d7692f 100755 --- a/src/fixperms.sh +++ b/src/fixperms.sh @@ -117,14 +117,13 @@ doone() { fixfile() { read GID LOGIN - /usr/bin/setfacl -bk $file + /usr/bin/setfacl -bk "$file" echo "gid: $GID" echo "file: $file" - chown alterncpanel:$GID $file - chmod 0770 $file - /usr/bin/setfacl -m u:$GID:rw- -m g:$GID:rw- -m g:alterncpanel:rw- -m u:$GID:rw- -m g:$GID:rw- $file + chown alterncpanel:$GID "$file" + chmod 0770 "$file" + /usr/bin/setfacl -m u:$GID:rw- -m g:$GID:rw- -m g:alterncpanel:rw- -m u:$GID:rw- -m g:$GID:rw- "$file" echo file ownership and ACLs changed - } if [[ "$file" != "" ]]; then