Bugfixing html folder permission upon installation

This commit is contained in:
Steven Mondji-Lerider 2013-08-12 12:47:31 +00:00
parent 4104c8292c
commit 60b2fd2ac3
1 changed files with 4 additions and 5 deletions

View File

@ -121,15 +121,14 @@ for i in "$ALTERNC_HTML" "$ALTERNC_MAIL" "$ALTERNC_LOGS" ; do
test -d "$i" || mkdir -p "$i"
done
find $ALTERNC_LOGS -maxdepth 1 -type d -exec chown alterncpanel:adm {} \;
find $ALTERNC_HTML -maxdepth 1 -type d -exec chown alterncpanel:alterncpanel {} \;
find $ALTERNC_MAIL -maxdepth 1 -type d -exec chown vmail:vmail {} \;
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z _ 0 1 2 3 4 5 6 7 8 9; do
test -d "$ALTERNC_HTML/$i" || ( mkdir -p "$ALTERNC_HTML/$i" && chown www-data:www-data "$ALTERNC_HTML/$i" )
test -d "$ALTERNC_HTML/$i" || ( mkdir -p "$ALTERNC_HTML/$i" && chown alterncpanel:alterncpanel "$ALTERNC_HTML/$i" )
test -d "$ALTERNC_MAIL/$i" || ( mkdir -p "$ALTERNC_MAIL/$i" && chown vmail:vmail "$ALTERNC_MAIL/$i" && chmod 775 "$ALTERNC_MAIL/$i" )
done
find $ALTERNC_LOGS -maxdepth 1 -type d -exec chown alterncpanel:adm {} \;
find $ALTERNC_HTML -maxdepth 1 -type d -exec chown alterncpanel:alterncpanel {} \;
find $ALTERNC_MAIL -maxdepth 1 -type d -exec chown vmail:vmail {} \;
# Check ACL
aclcheckfile="$ALTERNC_HTML/test-acl"