diff --git a/debian/rules b/debian/rules index af42b188..b9a80406 100755 --- a/debian/rules +++ b/debian/rules @@ -67,13 +67,6 @@ install: build chown -R www-data:www-data debian/alternc/var/alternc/html debian/alternc/var/log/alternc debian/alternc/var/alternc/tmp chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh - for sub in mail html ; do \ - 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 \ - mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\ - chown www-data debian/alternc/var/alternc/${sub}/${i} ;\ - done ;\ - done - #log directory mkdir -p debian/alternc/var/alternc/logs chown 1999:1999 debian/alternc/var/alternc/logs diff --git a/install/alternc.install b/install/alternc.install index d5d71b8e..64e21f9f 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -132,6 +132,11 @@ chown alterncpanel:adm "$ALTERNC_LOGS" chown www-data:www-data "$ALTERNC_HTML" chown vmail:vmail "$ALTERNC_MAIL" +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_MAIL/$i" || ( mkdir -p "$ALTERNC_MAIL/$i" && chown vmail:vmail "$ALTERNC_MAIL/$i" ) +done + # Check ACL aclcheckfile="$ALTERNC_HTML/test-acl" touch "$aclcheckfile"