Questions tagged [chroot]
chroot is a command on UNIX-like systems which runs a process under a different root directory.
177
questions
0
votes
0
answers
10
views
Mount overlay file system over root in linux [duplicate]
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
30
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
34
views
Chroot into overlay filesystem over root
I want to install some packages in linux for testing purposes but leave the system untouched after the testing.
My idea is to mount an overlay filesystem over the root (/) and then chroot to that to ...
0
votes
0
answers
30
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
18
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 ...
1
vote
1
answer
266
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: ...
0
votes
0
answers
41
views
How to bind mount paths once pivot root is done
Background:
I am setting up a pivot root environment for my process successfully, using minijail library. This puts my process in its own mount namespace.
Problem:
Once the process is pivot-rooted, is ...
0
votes
0
answers
30
views
how to mount /proc in a chroot and still get a core dumped?
I have a Debian debootstrapped into a chroot on my Ubuntu machine.
I have mounted the /proc of the host into the chroot :
proc on /home/stan/jessie-root/proc type proc (rw,relatime)
If a program ...
0
votes
1
answer
104
views
warning: no inet socket available: No such file or directory
so there i am using chroot to chrooting into debian bootstrap everything worked just right on root account until i added a new user to figure out that i cannot do update or access xdisplay or ...
1
vote
2
answers
452
views
LFS chroot cannot find /usr/bin/env
I am building Linux from Scratch (guide version 10.1). Everything compiled without any errors, but I am now stuck at the step where it requires me to enter the chroot environment (section 7.4). My ...
0
votes
0
answers
26
views
How can I use a cron job to execute a script inside a chroot?
I have a Synology NAS 213j with many limitations due to its armel architecture. Via entware-ng I have a chroot with debian stretch running on it, which at least let me do a few more things. Now I ...
0
votes
2
answers
566
views
How to hide other user's home directories on Linux
I run several systems with hundreds of home directories (a custom web hosting setup, where third parties can have control of certain accounts).
Currently any user could SSH in (or via a script) do &...
0
votes
1
answer
200
views
Chroot, Containers or Virtualization on OS X for safe development
I would like to provide a bit of context before asking my questions:
I've been working on Windows/Linux for years, and recently I was having a good time with WSL2.
My Windows machine isn't powerful, ...
0
votes
0
answers
60
views
Certain programs not seeing files over SMB/CIFS share, but others (like "file") work fine
I'm experiencing an interesting issue with a Samba mount whereby files and directories are recognised fine by some programs (like file, cp, mv, find, and ls) but are apparently non-existent by others (...
2
votes
1
answer
191
views
What is meant by "don't run processes as root in a chroot environmentl"
I read several articles that say one should avoid running processes as root in a chroot environment since it allows the process to escape.
But how should I do that? Chroot can only be evoked by root, ...
1
vote
0
answers
146
views
Cannot detach file-backed loop device after unmounting
I have some image files that I often use for cross-compilation work via chroot. My usual deal is to create a loop device with it, mount its main partition, bind mount /dev, /proc, /sys, and maybe /etc/...
0
votes
1
answer
669
views
How to mount /run from a Linux live usb in order to chroot?
I have a system dual booted with Windows 10 and Linux on it for some reason I'm getting "You need to load the kernel first" error on the grub menu so someone has advised me to boot from a ...
0
votes
0
answers
224
views
How to set up apparmor for Bind DNS?
I have figured that on my server apparmor was preventing me from running Bind in chrooted environment. I have created folder /chroot/named with all of the directories and files that Bind requires in ...
1
vote
1
answer
327
views
Connect with a user in SFTP and SSH
I want to allow a non-root user to log in SFTP with Filezilla (for modify files), in the /home/test folder AND to connect in SSH (for other operations).
I work on a Debian 10.7. Root is the owner of ...
0
votes
2
answers
122
views
how to change UUIDs on a boot stick, and update GRUB?
I've got a working Legacy/UEFI boot stick with Xubuntu focal. All is well with it. Now I'm creating clones, and for that purpose, I've changed stuff on each:
hostname
UUIDs of partitions
UUIDs ...
0
votes
1
answer
420
views
Is fakechroot a security flaw? [closed]
I recently know more about fakechroot.
AFAIK it seems dangerous since it escalates user privilege, even if it's in chroot. I'm aware of fakeroot but it is not the same since you can't do anything with ...
0
votes
1
answer
636
views
Howto properly mount /proc, /run to prevent chroot from being able to see or kill processes belonging to the host
I use a loop in a script to mount --bind special filesystems such as /dev, /dev/pts, /proc, /run, /sys (and /sys/firmware/efi/efivars optionally) this way :
for specialFS in dev dev/pts proc run sys
...
0
votes
0
answers
35
views
OpennSSH for windows: %u gives <domainname>/<username>
I'm using OpenSSH 8.1 for Windows and I'm trying to chroot users to their AD home dir [D:\homes\sub\<username>] using %h in the config file, however the chroot-directory redirects the user to ...
0
votes
0
answers
38
views
Trouble setting up permissions for jailed SFTP user
I'm running Arch and have created a new user named moderator that I would like to give access to a couple of folders that they can read / write to.
My plan was to create a new folder, named "mod&...
1
vote
0
answers
985
views
sshd "received disconnect: disconnected by user"
I can successfully login to the SFTP server (uses SFTP chrooting), but every time I issue ls, the connection will close:
I mounted /logs/xxx to /sftp/user/xxx and am unsure if the binding I did has ...
0
votes
1
answer
148
views
How can an SELinux filesystem be relabeled in an unpacked squashfs filesystem?
I am trying to configure selinux for a live boot Debian system.
SELinux is inoperable due to copious changes during build and system configuration and requires the entire filesystem to be relabeled. ...
2
votes
1
answer
585
views
grub-install hangs when rescuing a linux install via chroot
When attempting to repair a linux bootloader, grub can run into a problem.
Running update-grub leaves the program hanging and never completes sucessfully.
0
votes
1
answer
942
views
Fake /proc/cpuinfo when using chroot
I am trying to install some software using chroot for a Rpi image (pi-gen).
Pi-Gen uses chroot to install them.
Unfortunately when executing
cat /proc/cpuinfo
under chroot environment, i get the ...
0
votes
1
answer
539
views
Pulling an Docker Image within a chroot environment
I am trying to create my own, custom Raspberry Pi image using Pi-Gen https://github.com/RPi-Distro/pi-gen Basically I was able to fulfill most of my requirements, but I got a problem while trying to ...
0
votes
1
answer
100
views
Does chroot make effect on bootable usb-pendrive?
Let's suppose I put my Linux usb-pendrive inside my PC. I start the system and the I use chroot to apply same changes to the system.
What happen if I reboot the usb-pendrive? Are the changes I made ...
0
votes
0
answers
42
views
sftp and chroot on debian
I am experimenting with a server running Debian. It should replace my aging Apple server (and since the new Apple server is not a server anymore that is no longer an option).
So far everything goes ...
0
votes
0
answers
143
views
VLC automatically opens when I plug in headphones
I'm on Ubuntu 16.04. VLC media player version 2.2.2 Weathermax. Every time I plug in my headphones, VLC media player opens. I'm wondering if I can disable this from happening.
0
votes
0
answers
116
views
Gaining real su permission on gnu root debian instead of proot env?
Im running a samsung galaxy j110H, kitkat 4.4.4, rooted.
Is it possible to attain real super user privillige on gnuroot debian instead of fakerootfs. Is there any way as in when I type in su; there ...
1
vote
1
answer
8k
views
nano command not found after entering chroot during arch install
I am new to Linux and running into a problem while trying to install Arch Linux on bare metal with UEFI.
I have been following the installation guide on the Arch wiki and, like the title says, after ...
0
votes
1
answer
39
views
Mistakenly added user 'ubuntu' to a chroot group and cant login to server anymore
Ok, So I have an ubuntu server setup with SFTP chroot.
So, any user added to the group 'sftpusers' will be only able to use sftp commands on the server, today while testing rsync, i didnt think and ...
1
vote
2
answers
576
views
AIX 6.1 SFTP: Allow chroot'd user to access files in location outside their home
Long-winded first posting, I have tried to be succint while providing details.
I am working on an AIX 6.1 server where SFTP (via WinSCP) is already used by several service accounts to access files in ...
1
vote
1
answer
362
views
Can't start Apache in chroot with systemctl but can run it manually on my own from Bash with no issue
How to keep my Apache webserver running (prevent from being killed off for some unknown reason) in chroot when launched with systemctl at boot?
My setup requires multiple scripts and when I start the ...
0
votes
1
answer
205
views
chroot /bin/bash not found. How to fix without mounting /lib?
I want to chroot into an environment but it doesn't work since it says /bin/bash is not found. I don't know why, the host is running the same Linux image and arch.
I made it working by mounting /lib ...
0
votes
0
answers
48
views
Cannot detect filesystem for / in chroot
I have a script that requires knowing the file system type by using df /.
I'm running this script in a chroot centos7 environment running in a opensuse host, and it is failing because the file ...
1
vote
0
answers
32
views
Docker images that don't contain a package manager
I typically think of docker containers as executable processes that get to carry with them little bits of "environment", such that nothing needs to be installed on the docker host. For instance, a ...
0
votes
1
answer
90
views
PuTTy command script hangs after "chroot . sh"
I'm trying to automate a build with Putty, just ssh'ing into a VM and running a few commands by specifying a .txt file that contains the commands to run.
One of my commands is chroot . sh and it ...
0
votes
1
answer
365
views
chroot erase and overwrite the rootfs. Is it possible to mount a copy of /proc and /sys?
In my chroot I need /proc and /sys and /dev.
I am happy to bind-mount /dev since it is a temp fs. But /proc and /sys are part of the rootfs.
In my chroot I need to erase/re-format the rootfs (which ...
1
vote
1
answer
46
views
virtualbox snapshot - is it a safe back-up if I want to over-write (dd to) sda1?
I want to do some testing useing chroot to overwrite sda1 (my main partition) in a ubuntu VM. Is taking a virtualbox snapshot a safe way to create a backup?
i.e. in the VM I want to create a chroot ...
0
votes
1
answer
216
views
readelf fails in qemu chroot when using absolute path
I'm trying to install java 8 SDK in a qemu emulated chrooted environment and I'm running up against the following error
readelf: Error: /proc/self/exe: Failed to read file's magic number
Readelf ...
0
votes
1
answer
120
views
Is there a simple low-overhead way to install deb packages in a virtual environment?
When I'm working on some arbitrary project I usually need a couple of packages. For all the python packages I create a virtualenv so that once I'm done I can delete the whole thing, and it does not ...
1
vote
1
answer
3k
views
Why do I have to specify DNS when using chroot?
Last time when I chrooted from Live USB to my old broken system, I couldn't connect to Internet. In this tutorial, I read I should add OpenDNS to my /etc/resolv.conf if I use DHCP.
How does DHCP (or ...
8
votes
1
answer
6k
views
Fixing '/dev/null: Permission denied' repeatedly in chroot
I've chrooted into an external disk with sudo chroot /mnt/disk, but almost everything I do (logging in, tab-completion, lessing a file, ...) results in an error mentioning /dev/null: Permission denied,...
0
votes
0
answers
1k
views
Creating multiple SFTP users who use different SSH keys to connect to the same chrooted directory?
I have an Ubuntu-powered server, which - among other things - acts as file storage/hosting (powered by nginx), so that if a file is put in /var/www/files.ourcompany.com/file.txt, it is publicly ...
0
votes
1
answer
118
views
can't update computer inside chroot
I am repairing GRUB2.
I entered the old system from Live Usb using chroot. (As explained here.) I tried to run apt update and it said it couldn't access any server. (At least it told my this for any ...
5
votes
1
answer
6k
views
How to run docker inside chroot
I have debian stretch installed in arm64 android phone in chrooted environment. I have installed docker-ce following these steps from here.
On starting docker :: systemctl start docker
returns this ...