对于用户进程,我想在其他位置挂载一个目录,但在没有 root 权限的用户空间中挂载。类似 mount --bind /origin /dest 的东西,但带有 vfs 包装器。就像一个用户模式微调的 chroot。
该程序会将系统调用包装到文件中以“替换”所需的路径。可以使用如下命令行调用它:
bindvfs /fake-home:/home ls /home
我相信这已经存在了!:)
linux chroot mount not-root-user
chroot ×1
linux ×1
mount ×1
not-root-user ×1