Fixed permission denied error when deploying PostgreSQL in Azure using Docker. Fixes #7506

This commit is contained in:
Yogesh Mahajan
2022-06-27 19:36:20 +05:30
committed by Akshay Joshi
parent 35fb3bb38f
commit 659009c1de
7 changed files with 206 additions and 23 deletions

View File

@@ -112,6 +112,22 @@ def create_app_data_directory(config):
config.APP_VERSION))
exit(1)
# Create Azure Credential Cache directory (if not present).
try:
_create_directory_if_not_exists(config.AZURE_CREDENTIAL_CACHE_DIR)
except PermissionError as e:
print(FAILED_CREATE_DIR.format(config.AZURE_CREDENTIAL_CACHE_DIR, e))
print(
"HINT : Create the directory {}, ensure it is writable by\n"
"'{}', and try again, or, create a config_local.py file\n"
" and override the AZURE_CREDENTIAL_CACHE_DIR setting per\n"
" https://www.pgadmin.org/docs/pgadmin4/{}/config_py.html".
format(
config.AZURE_CREDENTIAL_CACHE_DIR,
getpass.getuser(),
config.APP_VERSION))
exit(1)
# Create Kerberos Credential Cache directory (if not present).
if config.SERVER_MODE and KERBEROS in config.AUTHENTICATION_SOURCES:
try: