VirtualMailManager/handler.py
branchv0.6.x
changeset 470 807ad4df0774
parent 458 4ff0fa3ba0fa
child 493 30365a87650d
equal deleted inserted replaced
469:1ebb6b88f589 470:807ad4df0774
   110         self._find_cfg_file()
   110         self._find_cfg_file()
   111         fstat = os.stat(self._cfg_fname)
   111         fstat = os.stat(self._cfg_fname)
   112         fmode = int(oct(fstat.st_mode & 0777))
   112         fmode = int(oct(fstat.st_mode & 0777))
   113         if fmode % 100 and fstat.st_uid != fstat.st_gid or \
   113         if fmode % 100 and fstat.st_uid != fstat.st_gid or \
   114            fmode % 10 and fstat.st_uid == fstat.st_gid:
   114            fmode % 10 and fstat.st_uid == fstat.st_gid:
       
   115             # TP: Please keep the backticks around the command. `chmod 0600 …`
   115             raise PermissionError(_(u"wrong permissions for '%(file)s': "
   116             raise PermissionError(_(u"wrong permissions for '%(file)s': "
   116                                     u"%(perms)s\n`chmod 0600 %(file)s` would "
   117                                     u"%(perms)s\n`chmod 0600 %(file)s` would "
   117                                     u"be great.") % {'file': self._cfg_fname,
   118                                     u"be great.") % {'file': self._cfg_fname,
   118                                   'perms': fmode}, CONF_WRONGPERM)
   119                                   'perms': fmode}, CONF_WRONGPERM)
   119         else:
   120         else: