[tor-commits] [chutney/master] Create client data directories in mode 0700

teor at torproject.org teor at torproject.org
Wed Feb 15 04:10:08 UTC 2017


commit 5d98fae0db8d18f48447cf7eaaa1f2e1e3b23354
Author: teor <teor2345 at gmail.com>
Date:   Wed Feb 15 14:44:20 2017 +1100

    Create client data directories in mode 0700
    
    This allows control sockets to work by default.
    
    Fixes #21464.
---
 lib/chutney/TorNet.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 6db7ad4..ced5727 100644
--- a/lib/chutney/TorNet.py
+++ b/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.



More information about the tor-commits mailing list