diff --git a/pykolab/auth/ldap/syncrepl.py b/pykolab/auth/ldap/syncrepl.py
--- a/pykolab/auth/ldap/syncrepl.py
+++ b/pykolab/auth/ldap/syncrepl.py
@@ -22,7 +22,7 @@
             del kwargs['callback']
 
         ldap.ldapobject.LDAPObject.__init__(self, *args, **kwargs)
-        self.__db = anydbm.open(filename, 'c', 0640)
+        self.__db = anydbm.open(filename, 'c', 0o640)
         self.__presentUUIDs = {}
 
     def syncrepl_set_cookie(self,cookie):
diff --git a/pykolab/logger.py b/pykolab/logger.py
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -213,7 +213,7 @@
                                 group_gid
                             )
 
-                            os.chmod(self.logfile, '0660')
+                            os.chmod(self.logfile, 0o660)
 
                     except Exception as errmsg:
                         self.error(
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -243,7 +243,7 @@
                 )
 
     if not os.path.isdir('/etc/postfix/ldap'):
-        os.mkdir('/etc/postfix/ldap/', 0770)
+        os.mkdir('/etc/postfix/ldap/', 0o770)
 
     for filename in files.keys():
         fp = open(filename, 'w')
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -256,7 +256,7 @@
 
 
     fp = open('/tmp/kolab-setup-my.cnf', 'w')
-    os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+    os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
     fp.write(data)
     fp.close()
 
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -259,7 +259,7 @@
 """ % (mysql_root_password, conf.mysqlhost)
 
         fp = open('/tmp/kolab-setup-my.cnf', 'w')
-        os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+        os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
         fp.write(data)
         fp.close()
 
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -109,7 +109,7 @@
 """ % (mysql_root_password, conf.mysqlhost)
 
         fp = open('/tmp/kolab-setup-my.cnf', 'w')
-        os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+        os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
         fp.write(data)
         fp.close()
 
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -204,7 +204,7 @@
             pass
 
         s.bind(conf.socketfile)
-        os.chmod(conf.socketfile, 0777)
+        os.chmod(conf.socketfile, 0o777)
 
         s.listen(5)