mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-10 04:58:03 -05:00
Ensure sanity of the permissions on the storage and session directories and the config database. Fixes #4182
This commit is contained in:
@@ -21,12 +21,14 @@ def create_app_data_directory(config):
|
||||
"""
|
||||
# Create the directory containing the configuration file (if not present).
|
||||
_create_directory_if_not_exists(os.path.dirname(config.SQLITE_PATH))
|
||||
os.chmod(os.path.dirname(config.SQLITE_PATH), 0o700)
|
||||
|
||||
# Create the directory containing the log file (if not present).
|
||||
_create_directory_if_not_exists(os.path.dirname(config.LOG_FILE))
|
||||
|
||||
# Create the session directory (if not present).
|
||||
_create_directory_if_not_exists(config.SESSION_DB_PATH)
|
||||
os.chmod(os.path.dirname(config.SESSION_DB_PATH), 0o700)
|
||||
|
||||
# Create the storage directory (if not present).
|
||||
_create_directory_if_not_exists(config.STORAGE_DIR)
|
||||
|
||||
Reference in New Issue
Block a user