Everything in question. When I try to use chroot with "." or the full path as an argument, perror tells me "Operation not allowed." If the answer to my question is yes, is there any other way to change the root directory? (Without barbaric methods using strcmp () / strncmp ())
Thank!
chrootcan only be used by roothim / her /. And no, there will be no other way without compromising security.
chroot
root
From Wikipedia
root chroot. , setuid chroot (, /etc/passwd /etc/shadow ), .
. .
PRoot ptrace syscall, - chroot.
fakechroot chroot
schroot. /etc/schroot/schroot.conf
[xenial] description=Ubuntu 16.04 (xenial) type=directory directory=/srv/chroots/xenial aliases=xenial-lts profile=minimal users=bob personality=linux64
:
schroot -c xenial