* 'VirtualMailManager/VirtualMailManager.py'
authorPascal Volk <neverseen@users.sourceforge.net>
Thu, 01 May 2008 19:27:06 +0000
changeset 28 87da30d30fde
parent 27 8c5f1eba0ea6
child 29 9653d4f5d97f
* 'VirtualMailManager/VirtualMailManager.py' - Create base directory with correct access mode and gid, if it does not exist yet.
ChangeLog
VirtualMailManager/VirtualMailManager.py
--- a/ChangeLog	Thu May 01 00:51:11 2008 +0000
+++ b/ChangeLog	Thu May 01 19:27:06 2008 +0000
@@ -1,5 +1,13 @@
+=== 0.0.0 ===
+2008-05-01  Pascal Volk  <neverseen@users.sourceforge.net>
+
+	* VirtualMailManager/VirtualMailManager.py (VirtualMailManager.__chkenv()):
+		Create the base directory with correct access mode and gid, if it does
+		not exist yet.
+
 === 0.4 ===
 2008-04-30  Pascal Volk  <neverseen@users.sourceforge.net>
+
 	* vmm.1, vmm.cfg.5:
 		Reworded some parts.
 	* vmm:
--- a/VirtualMailManager/VirtualMailManager.py	Thu May 01 00:51:11 2008 +0000
+++ b/VirtualMailManager/VirtualMailManager.py	Thu May 01 19:27:06 2008 +0000
@@ -84,8 +84,10 @@
     def __chkenv(self):
         """"""
         if not os.path.exists(self.__Cfg.get('domdir', 'base')):
-            old_umask = os.umask(0007)
-            os.makedirs(self.__Cfg.get('domdir', 'base'), 0770)
+            old_umask = os.umask(0006)
+            os.makedirs(self.__Cfg.get('domdir', 'base'), 0771)
+            os.chown(self.__Cfg.get('domdir', 'base'), 0,
+                    self.__Cfg.getint('misc', 'gid_mail'))
             os.umask(old_umask)
         elif not os.path.isdir(self.__Cfg.get('domdir', 'base')):
             raise VMMException(('%s is not a directory' %