mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
对 testcase 使用 nobody 700 的权限
This commit is contained in:
parent
ab751ee4b5
commit
ee12a1f527
@ -60,4 +60,5 @@ done
|
|||||||
|
|
||||||
|
|
||||||
chown -R nobody:nogroup $DATA $APP/dist
|
chown -R nobody:nogroup $DATA $APP/dist
|
||||||
|
chmod -R 700 $DATA/test_case
|
||||||
exec supervisord -c /app/deploy/supervisord.conf
|
exec supervisord -c /app/deploy/supervisord.conf
|
||||||
|
|||||||
@ -79,6 +79,11 @@ class TestCaseZipProcessor(object):
|
|||||||
|
|
||||||
with open(os.path.join(test_case_dir, "info"), "w", encoding="utf-8") as f:
|
with open(os.path.join(test_case_dir, "info"), "w", encoding="utf-8") as f:
|
||||||
f.write(json.dumps(test_case_info, indent=4))
|
f.write(json.dumps(test_case_info, indent=4))
|
||||||
|
|
||||||
|
os.chmod(test_case_dir, 0o700)
|
||||||
|
for item in os.listdir(test_case_dir):
|
||||||
|
os.chmod(os.path.join(test_case_dir, item), 0o600)
|
||||||
|
|
||||||
return info, test_case_id
|
return info, test_case_id
|
||||||
|
|
||||||
def filter_name_list(self, name_list, spj, dir=""):
|
def filter_name_list(self, name_list, spj, dir=""):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user