Questions tagged [chroot]
chroot is a command on UNIX-like systems which runs a process under a different root directory.
182
questions
0
votes
0
answers
15
views
How to run gnome wayland inside schroot?
I would like to run Gnome using wayland inside a schroot. So far my experiements have been unsuccessful. Here is how I have set-up the schroot:
debootstrap --variant=minbase --include=sudo bookworm /...
1
vote
0
answers
24
views
How to change root without side effects
How can I, preferably without entering a new subshell, change root for the current shell, while keeping the same environment ? The assumption would be that the new root and sub-directories from that ...
0
votes
0
answers
70
views
Unable to get to switch_root mode in CentOS 7
I am trying to reset the root password on my old drive, and I followed this instruction:
https://www.redhat.com/sysadmin/recover-root-passwd
However, instead of booting into a 'rescue' prompt as the ...
0
votes
0
answers
418
views
How to properly unmount a bind mount?
In order to create a chroot, I often do something like:
mount --bind /dev ./dev
But when I try to unmount ./dev, it sometimes attempts to unmount/redirect to /dev instead.
How to tell I want to ...
0
votes
1
answer
140
views
stat not working correctly in proot environment
I'm trying to use proot under Ubuntu 22.04 to create an isolated environment with a separate home directory. I'm running the following:
proot -r /home/user/testroot/ -w /home/user -b /bin:/bin! -b /...
0
votes
1
answer
90
views
Cant start xinit from chroot
I have been trying to run a graphical system from a debian bootstrap
What i did is create a basic bootstrap using debootstrap,
Installed openbox as a test wm,
Set Display variable according to Arch ...
0
votes
0
answers
1k
views
Kali linux Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
I was running fsck for a disk in initramfs and after it finished, I wrote “exit” in terminal. After that, when booting in that drive, I still have the kernel panic screen. Tried to chroot into broken ...
1
vote
2
answers
641
views
LFS 11.2 on Ubuntu Server 22.04: chroot: failed to run command ‘/usr/bin/env’: No such file or directory
I have been following the LFS 11.2 guide and it has gone smoothly up until the chroot part. Although the symlinks have created properly i.e. relative to the LFS directory, the error is still ...
1
vote
1
answer
692
views
how to chroot a python app?
I created a simple app in python flask, I would like to put it in a chroot. a very thin jail only containing the bare minimum for this app to run. This is for a school project so I need to use chroot. ...
0
votes
0
answers
146
views
How to chroot nginx virtual hosts
I want to prevent php scripts inside virtual hosts from accessing files outside their document root.
How is this possible without using containerization ?
1
vote
1
answer
13k
views
How to create SFTP user with specified directory permissions
I have done the following tutorial: How to Create SFTP User with Specified Directory Permissions in Ubuntu 20.04.
Creating new Sftp User:
# useradd -m -d /home/example.com sftp_user
# passwd sftp_user
...
1
vote
1
answer
2k
views
How to mount overlay filesystem over root folder in linux?
I want to mount an overlay filesystem over the root folder.
My commands are:
mkdir -p merged upper work
sudo mount -t overlay ovr -o index=off -o lowerdir=\,upperdir=upper,workdir=work merged
I get ...
0
votes
0
answers
260
views
SFTP prevent user from deleting original directory
I cannot find how to prevent chroot users from deleting some original directory. I have an SFTP that is already working. Below is my process to create a directory for new partners.
[root@...]# ...
0
votes
0
answers
270
views
How to avoid chroot jail affect actual system (e.g. update system time)?
I am new to chroot. I thought chroot is a contained separated system that would avoid things happen inside chroot jail affecting the actual system outside the jail. However I just confirmed that if I ...
2
votes
1
answer
2k
views
How to chroot into a WSL installation form another WSL installation?
I want to chroot into my Kali Linux WSL from my Ubuntu WSL. I'm running WSL2. In Windows, I mapped my Kali Linux WSL installation (\\wsl$\kali-linux) to the drive K:. In Ubuntu WSL, I mounted the K: ...