diff --git a/dmoj/cptbox/isolate.py b/dmoj/cptbox/isolate.py index e1391542f..2b0812eff 100644 --- a/dmoj/cptbox/isolate.py +++ b/dmoj/cptbox/isolate.py @@ -293,10 +293,10 @@ def _file_access_check( normalized, real, ) - return file, ACCESS_EPERM + return file, ACCESS_EACCES if not fs_jail.check(normalized): - return normalized, ACCESS_EPERM + return normalized, ACCESS_EACCES if normalized != real: proc_dir = f'/proc/{debugger.pid}' @@ -304,7 +304,7 @@ def _file_access_check( real = os.path.join('/proc/self', os.path.relpath(real, proc_dir)) if not fs_jail.check(real): - return real, ACCESS_EPERM + return real, ACCESS_EACCES return real, None