MCPcopy Create free account
hub / github.com/apache/httpd / check_file_permissions

Method check_file_permissions

test/modules/md/md_env.py:547–569  ·  view source on GitHub ↗
(self, domain)

Source from the content-addressed store, hash-verified

545 time.sleep(0.1)
546
547 def check_file_permissions(self, domain):
548 dpath = os.path.join(self.store_dir, 'domains', domain)
549 assert os.path.isdir(dpath)
550 md = json.load(open(os.path.join(dpath, 'md.json')))
551 assert md
552 acct = md['ca']['account']
553 assert acct
554 self.check_file_access(self.path_store_json(), 0o600)
555 # domains
556 self.check_file_access(self.store_domains(), 0o700)
557 self.check_file_access(os.path.join(self.store_domains(), domain), 0o700)
558 self.check_file_access(self.store_domain_file(domain, 'privkey.pem'), 0o600)
559 self.check_file_access(self.store_domain_file(domain, 'pubcert.pem'), 0o600)
560 self.check_file_access(self.store_domain_file(domain, 'md.json'), 0o600)
561 # archive
562 self.check_file_access(self.store_archived_file(domain, 1, 'md.json'), 0o600)
563 # accounts
564 self.check_file_access(os.path.join(self._store_dir, 'accounts'), 0o755)
565 self.check_file_access(os.path.join(self._store_dir, 'accounts', acct), 0o755)
566 self.check_file_access(self.path_account(acct), 0o644)
567 self.check_file_access(self.path_account_key(acct), 0o644)
568 # staging
569 self.check_file_access(self.store_stagings(), 0o755)
570
571 def get_ocsp_status(self, domain, proto=None, cipher=None, ca_file=None):
572 stat = {}

Callers 3

test_md_702_001Method · 0.80
test_md_502_100Method · 0.80
test_md_602_000Method · 0.80

Calls 9

check_file_accessMethod · 0.95
path_store_jsonMethod · 0.95
store_domainsMethod · 0.95
store_domain_fileMethod · 0.95
store_archived_fileMethod · 0.95
path_accountMethod · 0.95
path_account_keyMethod · 0.95
store_stagingsMethod · 0.95
joinMethod · 0.80

Tested by 3

test_md_702_001Method · 0.64
test_md_502_100Method · 0.64
test_md_602_000Method · 0.64