瀏覽代碼

Create client data directories in mode 0700

This allows control sockets to work by default.

Fixes #21464.
teor 7 年之前
父節點
當前提交
5d98fae0db
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      lib/chutney/TorNet.py

+ 5 - 1
lib/chutney/TorNet.py

@@ -335,9 +335,13 @@ class LocalNodeBuilder(NodeBuilder):
 
     def _makeDataDir(self):
         """Create the data directory (with keys subdirectory) for this node.
+
+          448 is the decimal representation of the octal number 0700. Since
+          python2 only supports 0700 and python3 only supports 0o700, we can
+          use neither.
         """
         datadir = self._env['dir']
-        mkdir_p(os.path.join(datadir, 'keys'))
+        mkdir_p(os.path.join(datadir, 'keys'), 448)
 
     def _makeHiddenServiceDir(self):
         """Create the hidden service subdirectory for this node.