diff --git a/jieba/__init__.py b/jieba/__init__.py index ef65cf57..4c585dc3 100644 --- a/jieba/__init__.py +++ b/jieba/__init__.py @@ -152,6 +152,7 @@ def initialize(self, dictionary=None): with os.fdopen(fd, 'wb') as temp_cache_file: marshal.dump( (self.FREQ, self.total), temp_cache_file) + os.chmod(fpath, 0o666) _replace_file(fpath, cache_file) except Exception: default_logger.exception("Dump cache file failed.")