Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chroot]

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

0
votes
1answer
54 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
22 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
47 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
0answers
28 views

How to access overlayfs “upper” dir on a Linux live session that was booted without the “persistent” option

I've been trying to figure out how to programmatically or non-programmatically escape the /cow/upper chroot that is set up by the casper init scripts on Debian based Linux live distros. The problem I'...
0
votes
1answer
17 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 ...
0
votes
1answer
357 views

Why do I have to specify DNS when using chroot?

Last time I couldn't connect to Internet when I chrooted from Live USB to my old broken system. In this tutorial I read I should add Open DNS to my /etc/resolv.conf if I use DHCP. How DHCP (or chroot)...
0
votes
0answers
27 views

After setting up chroot the files do not show the User and Group

I have a little problem in that I have set up a directory to be chrooted by a group and this is working fine. My problem is that when I go to test using WinSCP the files show the ownership as the PID ...
2
votes
1answer
786 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
261 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
49 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
2k 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
33 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
61 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
326 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
48 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 ...
1
vote
0answers
141 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
79 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
373 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
315 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
385 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
550 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
1k 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 ...
1
vote
1answer
586 views

/bin/bash (chrooted) no longer works

Previously all our web customers were setup to access their SFTP using the shell /bin/bash(chrooted). As of 1-17-17 it was working for everyone. The following monday 1-20-17 it was not. This issue is ...
3
votes
1answer
521 views

How to install arch linux packages with yaourt when invoked with docker build from Dockerfile?

I am trying to build my own jira container using official pritunl/archlinux image. I have already installed yaourt and committed that to rusk85/archbase. My Dockerfile looks like this: 1: FROM rusk85/...
4
votes
1answer
6k views

Error starting node.js localserver - undefined EventEmitter prototype

I'm trying to use Coder. Coder is an application developed by google based on node.js server. It was initially designed for the Raspberry Pi, but according to the Coder project in GitHub, it should ...
0
votes
0answers
155 views

Using rssh to chroot causes rsync (code 12) error

I'm configuring my home NAS to periodically pull down backups from another server. On the server is a dummy-user using the rssh shell configured to only allow rsync access. I'd like to also chroot ...
0
votes
1answer
136 views

How to find whether system uses systemd in chroot?

I was using the following command to check whether system uses systemd if [[ 1 == pidof systemd ]]; then But this fails in chroot since proc is not mounted. sh-4.2# pidof systemd sh-4.2# ps Error, ...
1
vote
1answer
502 views

How to chroot Arch from a Gentoo live cd?

I have a laptop with 2 OS partitions: 1 for Windows 10, 1 for Arch Linux. The bootloader is the Windows one, so I cannot start Arch. Now my Windows suddenly broke, so my laptop cannot startup normally ...
2
votes
1answer
635 views

CentOS SFTP chroot

I've some issues chrooting an SFTP access for a client. I can access the directory, but the problem is I can't read / write, I can just access the directory. Below is what I've done : # cat /etc/...
0
votes
0answers
229 views

New Linux Subsytem on Windows, can we chroot?

I want to chroot into my existing Ubuntu Gnome 16.10 from new windows insider bash. the Main problem is there is no output for lsblk or blkid. so I tried "Paragon EXT4 drivers" and "ext2fsd" to ...
1
vote
0answers
119 views

How to sandbox code in chroot for multiple users?

What am I trying to do? I'm writing a code evaluator using chroot and python and went to hackerrank for some inspiration. What I think is happening at Hackerrank? Hackerrank creates run-...
1
vote
1answer
442 views

How to drop privileges in a Debian Chroot?

I'm testing some software under Debian X32. Its a chroot environment, and its entered upon as root. Some of the tests are failing because of the root account: make test ... # Failed test 'Testing ...
0
votes
1answer
810 views

how to mount chroot /proc on ubuntu start

In order to run java inside chroot environment I have to mount /proc file system using the following command mount -t proc none /proc inside the chroot environment or mount -o bind /proc /path/to/...
1
vote
0answers
109 views

exiting chroot leads to getpt failure

On a Debian Jessie machine I have a rootfs image which I chroot in this way: mount myimage.img /mnt/myimage cp /usr/bin/qemu-arm-static /mnt/myimage/usr/bin/ mount --rbind /dev /mnt/myimage/dev mount ...
0
votes
1answer
2k views

SFTP chroot: sshd_selinux_copy_context: getcon failed with Permission denied [postauth]

I'm stucked with creating SFTP chroot. I'm able to log in, but i'm getting "Permission denied" whatever I try. sftp webadm@<ip>: webadm@<ip>'s password: Connected to <ip>. Changing ...
1
vote
2answers
268 views

How to Access `/dev` From Inside a `chroot` Jail?

     How can one access /dev from within a chroot jail? I'd like to know how to do this on OS X v10.11.5 'El Capitan,' in particular. I've already tried to create an ...
1
vote
1answer
1k views

openssh with virtual users and chroot

I'm looking for a way to run a opensshd offering sftp to users as a unprivileged user e.g. on port 8022. This opensshd should take something like a customer passwd file which can include information ...
0
votes
1answer
90 views

How to enable shortcuts (copy-paste) inside chrooted java app?

I instaled java-based app Lotus Notes inside ubuntu 12 chroot on debian host systems. I run it with enabled xhost+ on based system How to enable Ctrl+C, Ctrl+V shortcuts inside Lotus Notes. The ...
0
votes
0answers
91 views

Code Execution From Live USB's

For the purposes of education, I am trying to work out how to execute code onto a hard drive that has been mounted onto a Linux live USB. So far I have downloaded a copy of Ubuntu, and just run the ...
1
vote
0answers
256 views

creating linux device files for bootstrap

I'm currently independently researching device files as a part of learning more about the Linux system in depth. My current goal is to bootstrap Debian Linux through cdebootstrap. I followed the guide ...
2
votes
1answer
5k views

How do I mount as a read-write filesystem and not read-only?

I'm trying to install Gentoo in a virtual machine. I ran into this problem and began researching what the answer might be. The file system is read only. I can't mount it as read-write. I'd rather ...
0
votes
1answer
222 views

How to make a new SSH user for linux which will allow the user to access only that folder and cannot go back to other folders [duplicate]

How can i make a new SSH user for linux (Ubuntu) which will allow the user only to access that folder and not to go back to other folder, I have searched many tutorials/support for this but those all ...
0
votes
1answer
344 views

Where do we put “mount -t proc …” in a Chroot environment?

Please forgive my ignorance... I have a number of Debian Chroot environments for testing software. They were necessary due to our package maintainer testing us under the same. My test scripts use ...
0
votes
1answer
78 views

Install stuff in a schroot

I have a question regarding chroots: say I have a program compiled and built into a root file tree structure, ex: . ├── bin │ └── software ├── etc ... That is, to install this, I'd have to merge ...
1
vote
0answers
195 views

setting up mirrorlist for pacman.d in chroot / installing arch to usb stick

I am new to ArchLinux and—moreover—deeper linux noodling. I am following the guide on the Arch Wiki. I am at a step where I set up the mirror list for repositories. I have my mirrorlist file in ...
0
votes
1answer
3k views

Compiler tools, execv and “exec format error” under s390x chroot

I have a Debian 8 x86_64 machine with two chroot environments. The first is armel and the second is s390x. armel was installed last week, and s390x was installed recently. armel is fine both before ...
0
votes
1answer
252 views

Emacs in a Debian 8 chroot environment?

I'm working with a Debian maintainer on a failed self test for a software package under ARMEL. The maintainer was kind enough to help me duplicate his environment. When I attempt to add http://ftp....
0
votes
0answers
98 views

Roll back to libc6-amd64 using a live cd and chroot on ssd with GPT filesystem

I was attempting to follow a steam guide to install a dedicated game server. See my original post here. Basically I really messed up. I attempted to roll back but when it downgraded my network ...
1
vote
1answer
23 views

Linux unattached chroot or directory?

Would it be possible to chroot or otherwise create an unlinked(in the main root file system) directory? From what I understand, the kernel automatically deletes any file/folder that has no link in the ...
0
votes
1answer
754 views

Is running ldconfig inside fakeroot possible?

I am trying to run debian wheezy in chroot (got debian files from https://github.com/tianon/docker-brew-debian/blob/02108ee636f54b504e2aec4ee7bb59a2de8a5b99/wheezy/rootfs.tar.xz) That is the way i'm ...