Questions tagged [chroot]

chroot is a command on UNIX-like systems which runs a process under a different root directory.

Filter by
Sorted by
Tagged with
1
vote
0answers
29 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
0answers
12 views

How do I fix a “cannot open display” error when opening an X program under chroot?

I am under Debian buster (10) and needs bullseye (11). I have installed it in a directory following this and this: apt install schroot debootstrap vim /etc/schroot/chroot.d/bullseye [bullseye] ...
0
votes
1answer
25 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
0answers
10 views

Can mounting home folder directly inside a chrooted environment create conflicts?

Basically I'd been running GUI applications from within an LXC container, like so: ssh -X target the-gui-app However, possibly due to encryption overhead of ssh it uses much more resources than the ...
0
votes
0answers
22 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
1answer
53 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
2answers
49 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
1answer
92 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
1answer
51 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
0answers
22 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
0answers
29 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&...
0
votes
0answers
80 views

Cannot grub-install because efibootmgr fails in chroot

I'm trying to run grub-install on my system which I can access from a LiveUSB and then chroot into my LVM /dev/mapper/VGTout-rootFS LV (mounted in /mnt) : [root@sysresccd ~/myScripts/shl/system]# ./...
1
vote
0answers
464 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
0answers
43 views

How can SELinux be run within an unpacked squashfs filesystem?

Currently I enter a chroot and mount proc and sysfs to operate dpkg/apt: chroot [FS] mount -t proc none /proc/ mount -t sysfs none /sys/ export HOME=/root This will not allow SELinux commands to be ...
0
votes
1answer
47 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
1answer
254 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
1answer
416 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
1answer
287 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
1answer
42 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
0answers
39 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
0answers
89 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
0answers
95 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
1answer
6k 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
1answer
35 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
2answers
411 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
1answer
232 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
1answer
143 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
0answers
34 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
0answers
22 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
1answer
58 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
1answer
308 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
1answer
39 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
1answer
161 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
1answer
76 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
1answer
2k 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 ...
6
votes
1answer
5k 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
0answers
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
1answer
81 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
1answer
5k 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 ...
0
votes
1answer
66 views

chroot an user to more than one directory in different locations

I would like to know how I can constraint a user to only be able to access and have RWX permissions to directories like /etc/httpd, /etc/php and /var/www/html as well as its own home directory. Also ...
0
votes
1answer
81 views

Steam In home steaming not working on Chrome OS (via crouton)

I installed Debian stretch via crouton, and after navigating through "locales" problems, mounting problems, and video problems, I managed to get it to work very well on my Asus C202. However all ...
0
votes
0answers
560 views

ssh chroot + putty = no such file or directory

did anybody have same problem? I was setting chroot for sshd (OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016; Debian Jessie) As a result WinScp logsin successfully, and putty closes with ...
0
votes
1answer
88 views

How to access system clipboard from a chroot environment?

I am running vim in chroot but I don't seem to have access to the host system's clipboard even if I do "+p. It works in the host system's vim. Is it possible to make the chroot environment recognize ...
4
votes
0answers
295 views

Bind mounts not visible in chroot

I am using a debootstrap envs on my Arch system. I bind-mount some directories from my home dir into the chroot fs home dir, ie. /home/user/foo → /stretch/home/user/foo. I can see the content from the ...
2
votes
1answer
228 views

need clarifications on chroot command

I am trying to understand chroot. I am trying to run just "ls" command in chroot environment. So i copied "ls" and "bash" and its dependencies(as shown by ldd) to corresponding bin, lib, lib64 ...
1
vote
1answer
3k views

Can not login through ssh on my machine

Whenever I add a user to the "sftp" group so I can use chroot I can no longer connect through SSH and it says: "Could not chdir to home directory /home/sftp_user: No such file or directory" and "This ...
1
vote
1answer
744 views

chroot mount real /root

I have sample question in Linux. I create chroot environment, but I want to have for example same /root for my real system and my chroot environment. When I take this command: chroot /mysystem I ...
0
votes
1answer
1k views

su in Debian chroot gives critical error (embedded system)

I'm trying to install Debian jessie inside a chroot on a embedded system (QNAP NAS with kernel 2.6.33.2). I successfully run debootstrap to install the base system and the chroot works correctly ...
1
vote
2answers
1k views

Is it possible to run a process in chroot with virtual /proc filesystem under Linux?

I need to run a process in a chroot with a virtual /proc filesystem, so the process is unable to get access to other processes running on the same host. The process must be run under root and have ...
0
votes
1answer
2k views

How to upstart Debian Chroot on Synology to run Homebridge

I have a synology diskstation that I want to use to run homebridge. I have got homebridge working by installing the debian package for chroot and installing all the necessary things in chroot to get ...