Browse Source

Create client data directories in mode 0700

This allows control sockets to work by default.

Fixes #21464.
teor 7 years ago
parent
commit
5d98fae0db
1 changed files with 5 additions and 1 deletions
  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.