Index: /debian/postinst
===================================================================
--- /debian/postinst	(revision 136)
+++ /debian/postinst	(revision 219)
@@ -60,6 +60,6 @@
 	# Now substitute it on the conf file ;) 
 	cat /etc/alternc/alternc.conf | sed -e "s/^myip=.*/myip=$myip/" | sed -e "s/^fqdn=.*/fqdn=$fqdn/" | sed -e "s/^mx=.*/mx=$mx/" | sed -e "s/^DATA_PART=.*/DATA_PART=$DATA_PART/" | sed -e "s/^dbpwd=.*/dbpwd=$dbpwd/" | sed -e "s/^myrandom=.*/myrandom=$myrandom/" | sed -e "s/^ldap_userpwd=.*/ldap_userpwd=$ldap_userpwd/" | sed -e "s/^ldap_rootpwd=.*/ldap_rootpwd=$ldap_rootpwd/" >/etc/alternc/alternc.conf.new
-	rm /etc/alternc/alternc.conf
-	mv /etc/alternc/alternc.conf.new /etc/alternc/alternc.conf
+	cp /etc/alternc/alternc.conf.new /etc/alternc/alternc.conf
+	rm /etc/alternc/alternc.conf.new
     fi
 
Index: /debian/rules
===================================================================
--- /debian/rules	(revision 218)
+++ /debian/rules	(revision 219)
@@ -44,10 +44,15 @@
 	dh_installdirs
 
+# default perms that should be used
+# usr/lib/alternc/* root.www-data 750
+# etc/alternc/* root.root 750
 
 	# Add here commands to install the package into debian/tmp.
 	# conffiles
-	install -o root -g www-data -m750 \
+	install -o root -g www-data -m0750 -d debian/tmp/etc/alternc
+	install -o root -g www-data -m0750 \
 		install/etc/alternc/alternc.conf debian/tmp/etc/alternc/
-	install -o root -g root -m755 \
+	install -o www-data -g www-data -d debian/tmp/etc/webalizer
+	install -o www-data -g www-data -m0755 \
 		install/etc/webalizer/template.conf debian/tmp/etc/webalizer/
 	# les scripts d'install
@@ -104,5 +109,6 @@
 	dh_link
 	dh_compress
-	dh_fixperms
+#we handle our own perms
+#	dh_fixperms
 
 
Index: /install/scripts/alternc.install
===================================================================
--- /install/scripts/alternc.install	(revision 190)
+++ /install/scripts/alternc.install	(revision 219)
@@ -378,23 +378,8 @@
 # 11.5 setup permissions for scripts and configs
 system("chmod a+x /etc/init.d/iptables");
-system("chmod 750 /etc/alternc -R");
-system("chown root.root /etc/alternc -R");
-system("mkdir /var/run/alternc");
-system("mkdir /var/log/alternc");
-system("chown www-data.www-data /var/alternc/bureau/admin/webmail/.htaccess /etc/webalizer /var/alternc/bureau /var/alternc/html /var/alternc/mail /var/alternc/dns /var/run/alternc /var/log/alternc -R");
-system("chown root.www-data /usr/lib/alternc/ -R");
-system("chmod 0750 /usr/lib/alternc");
-system("chmod 0750 /usr/lib/alternc/*");
-system("chmod 4750 /usr/lib/alternc/mem_add");
-system("chmod 4750 /usr/lib/alternc/quota_edit");
-system("chmod 4750 /usr/lib/alternc/quota_get");
-system("chmod 4750 /usr/lib/alternc/mail_add");
-system("chmod 4750 /usr/lib/alternc/mail_del");
-system("chmod 4750 /usr/lib/alternc/mem_del");
-system("chmod 4750 /usr/lib/alternc/db_create");
+system("chown www-data.www-data /var/alternc/bureau/admin/webmail/.htaccess /var/alternc/bureau /var/alternc/html /var/alternc/mail /var/alternc/dns /var/run/alternc /var/log/alternc -R");
 system("chmod 0640 /var/alternc/bureau/class/*.php");
 system("chown root.www-data /var/alternc/bureau/class/*.php");
 system("chown root.www-data /var/alternc/bureau/class");
-system("chgrp www-data /etc/alternc");
 system("chgrp www-data /etc/alternc/local.sh");
 system("chgrp www-data /etc/alternc/sendmail");
