Skip to content

Commit d3f906f

Browse files
committed
Allow uploaded files to be writeable in nsjail
1 parent 05fe91a commit d3f906f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

snekbox/nsjail.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ def python3(
231231
for file in files:
232232
try:
233233
f_path = file.save_to(fs.home)
234+
# Allow file to be writable
235+
f_path.chmod(0o777)
234236
# Save the written at time to later check if it was modified
235237
files_written[f_path] = f_path.stat().st_mtime
236238
log.info(f"Created file at {(fs.home / file.path)!r}.")

0 commit comments

Comments
 (0)