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

learn more… | top users | synonyms

28
votes
4answers
54k views

mount dev, proc, sys in a chroot environment?

I'm trying to create a Linux image with custom picked packages.What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time ...
20
votes
1answer
27k views

What's the proper way to prepare chroot to recover a broken Linux installation?

This question relates to questions that are asked often. The procedure is frequently mentioned or linked to offsite, but is not often clearly and correctly stated. In an objective to concentrate ...
9
votes
1answer
3k views

How to add pointers to filesystems outside the chrooted environment - using chrooted SFTP via OpenSSH

So, I'm pretty sure this is true, but I haven't found a specifically detailed independent reference that directly answers my question. Question being: How can I add access to a resource that is ...
5
votes
1answer
2k views

Arch Linux Install, Why is arch-chroot giving me an error?

I'm following the Arch Linux install instructions found here from a live cd, and I'm stuck issuing the following command: # arch-chroot /mnt mount: sys is already mounted or /mnt/sys busy sys ...
4
votes
1answer
33 views

How to distinguish 'syscalls' form 'int 80h' when using ptrace

As far as I know, ptrace can only get syscall number by PTRACE_SYSCALL, but syscall number is different in x86 and x64. So is there any way to figure out where this syscall real origin? I am now ...
3
votes
2answers
2k views

Adding user to chroot environment

I've created a chroot system in my Ubuntu using schroot and debrootstrap, based on minimal ubuntu. However whenever I can't seem to add a new user into this chroot environment. Here is what happens. ...
3
votes
1answer
879 views

How to share a directory across chroots

I have multiple chroots with different sets of software version as a light-weight alternative to VMs. How can I share a directory across the VMs? Naturally, symlinks do not allow to escape a chroot. ...
3
votes
1answer
4k views

chrooted sftp user with write permissions to /var/www

I am getting confused about this setup that I am trying to deploy. I hope someone of you folks can lend me a hand: much much appreciated. Background info Server is Debian 6.0, ext3, with ...
3
votes
2answers
614 views

schroot build environment setup how to avoid bind-mount home

The recent linux distributions such as Fedora and Ubuntu all use chroot environment to make the build. Because when making the build often it needs to install some special tools, and to install to the ...
3
votes
2answers
1k views

How do I use the terminal SCREEN when chrooted?

How do I allow a user to use SCREEN on a chrooted user? I have tried everything but I keep on failing. I need the user to be able to use SCREEN when they are logged in bash as a chrooted user.
3
votes
2answers
2k views

Booting linux system from chroot: is there a better way to do this?

I want to set up Grub menu entry to boot into chrooted system (installed chrooted debootstrap to avoid touching existing system too much). Currently I do the following to attain it: Install ...
3
votes
1answer
603 views

limits.conf ulimits not being applied to chrooted processes

We allow users to execute scripts on our servers. Our security model involves chrooting them. We want to be able to apply ulimit restrictions to them, and the best way to do it would seem to be in ...
3
votes
1answer
356 views

SFTP with chroot in a folder that can not have root privileges

I have troubles with setup a SFTP with chroot in "public" folder. Each client on my server has 3 to X accounts. These three accounts are: USER - system account only for internal use, requires full ...
2
votes
2answers
3k views

Start a systemd service inside chroot

With init scripts (or with openrc) I alway could run services from a different installation root. but when I run chroot /somepath/to_root /usr/bin/systemctl start someservice I got: Running in ...
2
votes
1answer
476 views

Loading a new kernel in a chrooted environment

Is it posible to load a new kernel while in a chrooted environment. Say I have one linux distro and want to chroot into another and load its kernel
2
votes
1answer
390 views

Does schroot allow configuration files in the home directory to be overwritten?

When schroot is configured to mount /home, will packages installed inside the chroot overwrite the configuration files in $HOME? For example, if a newer version of gconf2 is installed inside the ...
2
votes
1answer
284 views

copied chroot jail directory cant be chrooted

I am developing a package so when users login through ssh they are forwarded to a chroot jail. The jail directory is created via makejail program on building process. But when the jail package copy ...
2
votes
0answers
130 views

Why is “ls /..” different to “ls /” in fakechroot fakeroot chroot environment?

I am testing a bash script. It sometimes does this: ls /.. In Linux, this is same as: ls / But in a fakechroot setup like this: fakechroot fakeroot chroot sandpit I get a list of files in my ...
2
votes
3answers
4k views

SFTP ChRoot result in broken pipe

I have a website that I want to add some restricted access to a sub-folder. For this, I've decided to use CHROOT with SFTP (I mostly followed this link : ...
1
vote
2answers
2k views

Linux commands “id” and “whoami” dependencies (for chroot environment)

I have a new openssh (openssh-server-6.1p1-4.fc18.i686) chroot environment in Fedora Core 18 and puts users in a chroot directory structure with a (bash) shell. During troubleshooting SELinux has been ...
1
vote
1answer
261 views

How do I enable tab tips in Bash?

I am working under debian squeeze. I always install packages such way: sudo apt-g(Tab pressed) i(Tab pressed) aria(Tab pressed) sudo apt-get install aria2 I have installed chroot squeeze to test my ...
1
vote
1answer
165 views

How do I safely allow unprivileged users to copy files to my server?

I know that I can use rsync over ssh to send files from one Linux computer to another. However, in this case I need to give access to my system to users with a lower level of trust (people who may ...
1
vote
3answers
116 views

Do all my programs have owner rights to all my files?

I'm worried about all my programs having full access to all my files. Eg: My user is 'john'. I install some program, say Dropbox. Dropbox runs as 'john'. Therefore it not only has full rights on its ...
1
vote
1answer
81 views

Is there any way to virtualize a Linux installation on another partition?

The basic idea is like this: run another Linux installation as if it was in VirturalBox or VM ware. With "chroot", I can do something similar. For example, I can mount the partition where Arch Linux ...
1
vote
1answer
1k views

Shared memory in chroot environment

I'm playing with Ubuntu 11.10 launched in a chroot environment under Android 3.2.1. Most of the software works fine except PostgreSQL. When installed or initdb launched it's saying: FATAL: could ...
1
vote
1answer
729 views

Exclude specific group/users from ForceCommand in OpenSSH ssd_config

I want to make ForceCommand internal-sftp and ChrootDirectory /jail the default for all users accessing a server via SSH. Only users in a certain group are allowed to escape this. How can I exclude a ...
1
vote
1answer
239 views

OpenBSD 'device not configured' error in chroot-ed environment

I have asked this question on StackOverflow but given the comment there it seems like it fits here better. This is almost certainly a system configuration issue—you didn't set up the jail ...
1
vote
1answer
443 views

Install full version of Unity on Chrome OS using crouton

I have an Acer Chromebook. Using crouton, I installed Ubuntu (unity) on it. I am pretty familiar Ubuntu 12.04. But the installed one is very minimized package. My fonts are missing and I manually ...
1
vote
2answers
134 views

schroot Don't Share Home Directory

I created a schroot recently (following the directions here), and it conveniently shares my (host) user home directory. That is, /home/username is the same in the chroot as outside the chroot. Where ...
1
vote
1answer
663 views

yum --installroot should use /etc/yum.repos.d?

I have a chroot environment in a directory. I want to install some RPM packages using the repositories in that chroot environment instead of the host OS ones. yum --installroot= will look for ...
1
vote
1answer
969 views

How do you run a server with chrooted Ubuntu on the HP TouchPad?

The problem: servers appear to be broken inside my Ubuntu chroot. No matter what kind of server I try to run, they all seem unresponsive (VLC server won't respond to client, mkRemote doesn't move the ...
1
vote
2answers
1k views

ping not working in a chroot

How can I use the ping command in a chroot environment? $ ping 8.8.8.8 ping: icmp open socket: Operation not permitted Currently I am using CentOs, but ideally there must be a solution that works ...
1
vote
1answer
350 views

Run valgrind inside a chroot environment on Debian?

Is it possible to use valgrind within a chroot environment on Debian? It seems to need to access the proc filesystem, which is unsurprisingly inaccessible. root@tree:/# valgrind valgrind: warning ...
1
vote
2answers
1k views

Guide to creating a chroot environment - specifically with a different kernel

I have successfully installed a Ubuntu chroot (Maverick) on a running Linux appliance (an old Thecus N5200PRO box) which has been running various services for me quite happily. When I attempted to ...
1
vote
1answer
561 views

os x snow leopard install xcode in chroot

I'm trying to build a chroot environment for testing developer builds of some software. I need xcode installed in this chroot to build it, but the xcode package from the snow leopard install dvd will ...
1
vote
2answers
3k views

Failed to su after making a chroot jail

On a 64 bit CentOS host I am using script make_chroot_jail.sh to put a user in a jail, not permitting it to see anything expect it's home at /home/jail/home/user1. I did it typing this: sudo ...
1
vote
1answer
239 views

Preferred way to create a chroot when chrooting subset of users when logging with SSH?

By using libpam-chroot it is possible to chroot subset of users quite easily based on an username when user is logging with SSH. What is a good way to create this chroot and libpam-chroot setup. One ...
1
vote
1answer
669 views

Chroot from Debian livecd

I'm trying to repair LILO on a Debian server. I'm trying to chroot, with chroot /mnt/boot /etc/csh and I get: chroot: cannot run command '/etc/csh': Permission denied How can I perform a chroot?
1
vote
0answers
36 views

Mounting /dev/shm in a Gentoo chroot on Xubuntu 14.04

I'm trying to install Gentoo, and instead of using one of the bootable minimal install CDs provided by Gentoo, I'm using a chroot in Ubuntu. I'm mainly following the instructions outlined here, ...
1
vote
0answers
24 views

How to get out of a chrooted environment in ArchLinux

I'm attempting to install ArchLinux via SSH. At the moment I'm not at the machine, but I do have root access to it. I have SSH setup in the Chroot environment (arch-chroot). Is there anyway, while ...
1
vote
0answers
16 views

Is there a way to use ACL to deny access to folders by user, preferrably by making them invisible?

Is there a way to use Linux's Access Control Lists feature to deny access to folders by user, preferrably by making them invisible? This is needed for a chroot SFTP environment where we want to block ...
1
vote
0answers
131 views

Unity closes on Ubuntu Logout, but does not complete logout. (Crouton on Chromebook)

I've got a Chromebook 14 "dual-booting" Ubuntu 14.04 using Crouton with the stock Chrome OS. I've had it like this for a while with everything operating fine. As you know, Linux Distros are kind of ...
1
vote
3answers
91 views

Chroot sftp jail seems to be insistent on not working

So I followed this guide to the letter: http://markshust.com/2013/04/01/how-setup-chrootd-sftp-account-linux and a few other guides as well, but I seem to be incapable of getting a connection. I am ...
1
vote
0answers
422 views

rsync error: symlink has no referent

I am trying to configure rsnapshot (which uses rsync) to backup a Windows server but I am having trouble with rsync being unable to follow a symlink on the server to be backed up. Setup: Windows ...
1
vote
2answers
996 views

How to start Xorg-server inside plain chroot?

when I runchroot /somepath /usr/bin/startxI got something what looks like an evdev problem... (I correctly --bind mounted /dev/ /dev/pts /dev/shm /proc /sys /tmp ) The screen is displayed and ...
1
vote
0answers
540 views

Logging rssh/chroot SFTP users

I'm trying to log activity (uploads, downloads, renames, deletes) for SFTP users. If I SFTP with a normal user, it logs to /var/log/secure. If I SFTP with a rssh user, it logs that they connected, but ...
1
vote
0answers
523 views

chroot under Mac OS X

So I have googled a lot with different search terms, but didn't find anything usable, only that intead of ldd I have to use otool -L to see the used libraries of a programm. I tried to copy bash into ...
1
vote
1answer
539 views

Use Qemu & chroot to reset password on mounted external disk

I have a NAS based on Linux, but the root password is kept secret by the manufacturer. Now to reset the password I am trying to mount the disk to my local linux computer. All of the files are present ...
1
vote
2answers
1k views

Create a tarball with a fake `root`

I'm working on something in a Makefile that will look something like this: tarball: mkdir -p tmp/tarball/etc/service mkdir -p tmp/tarball/usr/local mkdir -p ...
1
vote
0answers
27 views

statify executables in chroot

I am trying to run arbitrary executables in a chroot. Unfortunately I have different version of the shared library dependencies of some of the executables in the chroot. Is it possible to reroute the ...