From fa918228d56e1384e77adc193c4bd26356f6bd18 Mon Sep 17 00:00:00 2001
From: ed
Date: Thu, 4 Dec 2025 17:50:17 +0000
Subject: [PATCH] wram: also prevent moves
in addition to write-perms, also drop move-perms from ramdisks
since that is another potential source for confusion
additionally, write-access was correctly prevented, but
the ui would still indicate write permission, so fix that too
---
copyparty/fsutil.py | 6 ++++++
copyparty/web/browser.html | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/copyparty/fsutil.py b/copyparty/fsutil.py
index 70421e8f..d473c016 100644
--- a/copyparty/fsutil.py
+++ b/copyparty/fsutil.py
@@ -211,6 +211,12 @@ def ramdisk_chk(asrv: AuthSrv) -> None:
if fs == "tmpfs" or (mp == "/" and fs in ramfs):
mods.append((vn.vpath, ap, fs, mp))
vn.axs.uwrite.clear()
+ vn.axs.umove.clear()
+ for un, ztsp in list(vn.uaxs.items()):
+ zsl = list(ztsp)
+ zsl[1] = False
+ zsl[2] = False
+ vn.uaxs[un] = zsl
if mods:
t = "WARNING: write-access was removed from the following volumes because they are not mapped to an actual HDD for storage! All uploaded data would live in RAM only, and all uploaded files would be LOST on next reboot. To allow uploading and ignore this hazard, enable the 'wram' option (global/volflag). List of affected volumes:"
t2 = ["\n volume=[/%s], abspath=%r, type=%s, root=%r" % x for x in mods]
diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html
index b467af72..b7bd214f 100644
--- a/copyparty/web/browser.html
+++ b/copyparty/web/browser.html
@@ -53,7 +53,7 @@
📝
-