binpash / try

Inspect a command's effects before modifying your live system
MIT License
5.18k stars 66 forks source link

proc mounted with wrong permission #151

Open ezrizhu opened 7 months ago

ezrizhu commented 7 months ago

dr-xr-xr-x 235 nobody root 0 Mar 16 01:50 proc from #138

currently, we're using mount -t proc proc /proc

Attempted solution

unshare --mount --map-root-user --pid --fork /bin/bash
mkdir proc
mount -t proc -o uid=0,gid=0 none proc

but we get mount: a: wrong fs type, bad option, bad superblock on none, missing codepage or helper program, or other error.

ezrizhu commented 6 months ago

attempted --mount-proc with unshare(1), also came back as owned by nobody and nogroup. unable to remount with gid,uid=0 aswell.