Skip to content

Commit 154fd5e

Browse files
refactor: change dir permission.
1 parent ce52ee3 commit 154fd5e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

apps/maxkb/settings/lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
celery_data_dir = os.path.join(PROJECT_DIR, 'data', 'celery_task')
1717
if not os.path.exists(celery_data_dir) or not os.path.isdir(celery_data_dir):
1818
os.makedirs(celery_data_dir, 0o700, exist_ok=True)
19+
os.chmod(os.path.dirname(celery_data_dir), 0o700)
1920
# Celery using redis as broker
2021
redis_celery_once_db = CONFIG.get("REDIS_DB")
2122
redis_celery_db = CONFIG.get('REDIS_DB')

apps/tools/serializers/tool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def get_file_name():
6363
pylint_dir = os.path.join(PROJECT_DIR, 'data', 'pylint')
6464
if not os.path.exists(pylint_dir):
6565
os.makedirs(pylint_dir, 0o700, exist_ok=True)
66+
os.chmod(os.path.dirname(pylint_dir), 0o700)
6667
return os.path.join(pylint_dir, file_name)
6768

6869

0 commit comments

Comments
 (0)