mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-12-05 04:47:43 +08:00
On WSL2 the Windows drives under /mnt/<drive> are DrvFs (9p) mounts. With the default automount options they report 0777 for every directory and ignore chmod, so a CBM_CACHE_DIR there is refused by the private-directory walk: the ancestor rule (not world-writable) fails first, and the leaf 0700 rule would fail right after. The refusal is correct -- the 0777 is real -- but it gave WSL users no way forward. The security gate is unchanged. When the refusing directory is on a 9p filesystem under a WSL kernel (fstatfs magic 0x01021997 plus /proc/sys/kernel/osrelease), the ancestor refusal and the leaf "mode survived chmod" refusal now name the remedy: set [automount] options = "metadata,umask=22,fmask=11" in /etc/wsl.conf and run `wsl --shutdown`, or keep the cache on the Linux filesystem. The ancestor message uses shorter rule text on DrvFs so the remedy fits the 384-byte detail buffer. Detection compiles only on Linux; other platforms and non-WSL 9p mounts keep the generic message. A CBM_ENABLE_TEST_SEAMS switch forces the DrvFs verdict so the daemon_ipc suite checks the remedy text (and its absence off DrvFs) deterministically. docs/CONFIGURATION.md documents the WSL requirement. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>