proot-me / proot-rs

Rust implementation of PRoot, a ptrace-based sandbox
GNU General Public License v3.0
129 stars 21 forks source link

Document default cwd #29

Open oxr463 opened 3 years ago

oxr463 commented 3 years ago

I changed it from . to /, because current work dir (.) may be outside the new root(/), and it is hard to detranslate path ..

Furthermore, the default cwd for chroot is also / instead of ..

sudo chroot / /bin/sh -c "pwd -P"
# The output is `/`

_Originally posted by @KB5201314 in https://github.com/proot-me/proot-rs/pull/28#discussion_r651991926_

oxr463 commented 3 years ago

See: https://github.com/proot-me/proot/issues/66#issuecomment-55616771