aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ionite <[email protected]>2023-03-02 18:14:31 -0500
committerGravatar Ionite <[email protected]>2023-03-02 18:14:31 -0500
commitd3f906fca2b84926d2c9c47c526787784c355281 (patch)
treed1117be118f29a15ef2dfa6fe538d5e097813fe3
parentUpdate readme regarding default output path and last modified check (diff)
Allow uploaded files to be writeable in nsjail
-rw-r--r--snekbox/nsjail.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py
index 57083e1..3e0f742 100644
--- a/snekbox/nsjail.py
+++ b/snekbox/nsjail.py
@@ -231,6 +231,8 @@ class NsJail:
for file in files:
try:
f_path = file.save_to(fs.home)
+ # Allow file to be writable
+ f_path.chmod(0o777)
# Save the written at time to later check if it was modified
files_written[f_path] = f_path.stat().st_mtime
log.info(f"Created file at {(fs.home / file.path)!r}.")