mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
Tighten directory permissions
This commit is contained in:
parent
fdee755198
commit
b7801d0374
2 changed files with 3 additions and 0 deletions
|
@ -239,6 +239,7 @@ class Network(util.DaemonThread):
|
||||||
dir_path = os.path.join( self.config.path, 'certs')
|
dir_path = os.path.join( self.config.path, 'certs')
|
||||||
if not os.path.exists(dir_path):
|
if not os.path.exists(dir_path):
|
||||||
os.mkdir(dir_path)
|
os.mkdir(dir_path)
|
||||||
|
os.chmod(dir_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||||
|
|
||||||
# subscriptions and requests
|
# subscriptions and requests
|
||||||
self.subscribed_addresses = set()
|
self.subscribed_addresses = set()
|
||||||
|
|
|
@ -90,6 +90,7 @@ class SimpleConfig(PrintError):
|
||||||
if os.path.islink(path):
|
if os.path.islink(path):
|
||||||
raise BaseException('Dangling link: ' + path)
|
raise BaseException('Dangling link: ' + path)
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||||
|
|
||||||
self.print_error("electrum directory", path)
|
self.print_error("electrum directory", path)
|
||||||
return path
|
return path
|
||||||
|
@ -164,6 +165,7 @@ class SimpleConfig(PrintError):
|
||||||
if os.path.islink(dirpath):
|
if os.path.islink(dirpath):
|
||||||
raise BaseException('Dangling link: ' + dirpath)
|
raise BaseException('Dangling link: ' + dirpath)
|
||||||
os.mkdir(dirpath)
|
os.mkdir(dirpath)
|
||||||
|
os.chmod(dirpath, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||||
|
|
||||||
new_path = os.path.join(self.path, "wallets", "default_wallet")
|
new_path = os.path.join(self.path, "wallets", "default_wallet")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue