A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree.

learn more… | top users | synonyms

1
vote
1answer
5 views

Compiling a kernel for Gentoo with my module list from Xubuntu

A while ago, I started installing Gentoo on my Xubuntu box, using a chroot from Xubuntu, following these guides: https://wiki.gentoo.org/wiki/Handbook:AMD64 ...
2
votes
1answer
31 views

chroot with unionfs-fuse, can't access /dev/*

I have created the a chroot jail in combination with unionfs-fuse so that I don't need to install another system inside it. However, the resulting system's /dev entries are not readable.This is ...
2
votes
3answers
68 views

chroot permission denied! But Im root!

I am trying to chroot into an old HD to change a forgotten password, but chroot says permission denied? what gives? I am root! The harddrive I am trying to chroot into is an old version of edUbuntu ...
1
vote
1answer
842 views

Apache + mod_fcgid + chroot with mod_security. CentOS/RHEL 6

I am trying to setup a web server running Apache + mod_fcgid + mod_security chroot enabled and having a real hard time to get this working. Apache was installed from official CentOS repo and mod_fcgid ...
3
votes
3answers
901 views

Is there a drawback when using a chroot in high performance computing?

My (small) company uses an out-of-date linux (centos) software stack to run a proprietary software on a small cluster. Understandingly, IT is reluctant to upgrade since everything works now. I'd like ...
1
vote
1answer
25 views

Jail in chroot in debian 7.5 - Privileges Separation problem

I'm trying to create a jail for a user in my server. Let's call the user "juser". What do I want to achieve? I want an ssh user to be jailed in his home folder and not have any access (whatsoever) on ...
8
votes
2answers
364 views

Boot into a chroot?

I have Linux (Debian Jessie) installed on a hard drive. Drive - sda1, ext4fs, and sda2 - swap I have a /chroot folder. There is installed another system, in /chroot folder. Question: How to tell ...
-2
votes
0answers
11 views

PostgreSQL on Chroot Jail

I'm trying to run in a JAIL PostgresSQL but I can't make it work. What are the libraries and procedure to run PostgreSQL inside a JAIL.
1
vote
1answer
728 views

Any better alternative to chroot on an OpenVZ VPS?

Are there any better alternative to chroot environment? I'm thinking about running nginx on a jailed environment. BTW, I'm on OpenVZ VPS, so modifying the Kernel is a no-no. (I think that prevents ...
3
votes
1answer
572 views

suexec with chrooted environment

I'm trying to get a chrooted Apache environment working running mod_fcgid with suexec. Looking at suexec log inside jail, the wrapper scripts are being executed with no problems, however, when I look ...
1
vote
0answers
13 views

Debootstrap for Backbox Error with release file

I'm trying to install a BackBox (Ubuntu based) chroot environment with debootstrap using the following command: sudo debootstrap --variant=buildd --arch i386 trusty /MYJAIL/ ...
1
vote
0answers
11 views

How can schroot works with aufs

I'm using schroot with aufs. Currently, my conf file under \etc\schroot\chroot.d looks like [trusty_chrome] description=Ubuntu 14.04 Trusty running Chrome and Adobe Flash ...
1
vote
0answers
64 views

User Acces restrict to only one folder

I am trying to establsih SFTP User rights at a server to only one folder, following the guidelines here: ...
6
votes
3answers
39k views

Limit FTP access only to the /var/www with vsftpd

I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user. I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish ...
4
votes
1answer
420 views

Simulate chroot with unshare

I am trying to write a bootstrapper for a minimal, from-source linux distribution. I would like to build in a chroot-like environment. This should simplify packaging. I do not care about security at ...
2
votes
1answer
537 views

CHROOT: Unable to copy files to jailed users directory from local machine using WINSCP

I've setup a chroot environment for one of my users called client on my system. I'm using WINSCP to connect to my server from my machine using public key authentication. Everything works fine, I can ...
2
votes
1answer
423 views

How do I run chromium inside a chroot?

Okay, I can run Iceweasel 17 ESR fine and some simple X apps like xkill, so I know that it's not merely an X display problem. However any version of Chromium and Iceweasel 24 fail with the following ...
1
vote
1answer
52 views

How do I properly bind directories inside chroot jails using fstab?

I'm running nginx, PHP-FPM and MySQL on Debian Wheezy. I've set up chroot jails (with debootstrap) for each individual virtual host in /srv/. Everything is working like one would expect, but after ...
1
vote
0answers
19 views

How to write in home user with chrooted sftp

I have a problem with chroot sftp an their home folder. I would like to write in user's home but I don't have proper permission for doing that. sshd_config Match User demo ChrootDirectory %h ...
1
vote
1answer
55 views

Can I use Apache web server in a chroot-ed environment on Gentoo? And how?

I just installed Apache for the first time on Gentoo. When I chroot into Gentoo from another OS (in this case Microknoppix) and try to start Apache (with /etc/init.d/apache2 start) I get the error ...
2
votes
1answer
69 views

Permission denied in scripted chroot jail

I am attempting to script the creation of a chroot jail (I know that there are tools for this, but I am in it for the experience, so please don't recommend a tool). I have a script which looks up ...
1
vote
0answers
17 views

Chrooting any arbitrary program using dynamic linker?

One of the problems using chroots is getting all the binaries and libraries installed. It just occurred to me that there might be another way. The TSocks project uses a technique they call "shared ...
11
votes
4answers
56k views

How to create a FTP user with specific /dir/ access only on a Centos / linux installation

So I'm on a VPS - CentOS Linux installation. I have vsFTPd on the server. I currently have SFTP access to the server via my root user, but am now trying to create a new user with FTP access to a ...
3
votes
1answer
300 views

Backing up chroots for host reinstall

I've had my workstation for a couple of years now and its slowly become a complex beast, taking on many roles for my dev and test work. I have done some research and was thinking of setting up some ...
1
vote
1answer
258 views

Chroot gone wrong, can't ssh with user

Distribution: Scientific Linux 6.5 (Carbon), not exactly your typical brand of linux. Tried to chroot a user using these instructions for SSH and quite obviously failed, and now I can't even log in ...
1
vote
1answer
197 views

Disable operations outside user's home directory with chroot jail?

I'm trying to restrict a user to a specific directory called gclegal using a chroot jail. I've uncommented the line in the /etc/vsftpd.conf file chroot_local_user=YES Created a new user called kg: ...
4
votes
2answers
4k views

How to unmount a formerly chroot'd filesystem?

I'm using a rescue-live-system (similar to a live-cd) to fix some issues with my Debian server, like that: # mkdir -p /mnt/rescue # mount /dev/md2 /mnt/rescue # mount --bind /dev /mnt/rescue/dev/ # ...
4
votes
2answers
108 views

How to prevent schroot from overridding passwd file and others files already present on the chrooted system?

When I had to repair my Debian system, I tried to use schroot due the convenience of not having to mount bind several partitions. But, contrary to my expectations, schroot decided to override my ...
3
votes
1answer
108 views

Error message: unknown user 'geoclue' in statoverride file

I obtained a strange error message inside a chroot: unknown user 'geoclue' in statoverride file when running apt-get install or apt-get upgrade. I use schroot to enter this chroot. I found that I ...
1
vote
1answer
38 views

Define custom login shell in schroot

According to the schroot man page: schroot allows the user to run a command or a login shell in a chroot environment. If no command is specified, a login shell will be started in the user's ...
1
vote
1answer
82 views

Can't losetup anything on armhf NAS

I'm pretty new to linux and chrooted my NAS with armhf architecture and tried looping device: losetup -f losetup: Could not find any loop device. Maybe this kernel does not know about the loop ...
0
votes
0answers
53 views

How do I get back into crouton on a Chromebook?

I installed crouton with the Unity interface like in this tutorial. I tried to install Gimp with the terminal after two months of use and it froze so I quit the terminal and went out of ...
1
vote
1answer
40 views

Using bash environment from an external OS partition

I have an external partition, /dev/sda, which contains an Ubuntu OS. The root is located in /dev/sda2. I would like to access commands from this OS partition. I have tried doing the following ...
4
votes
1answer
103 views

Real chroot on a systemd machine

I'm trying to get used to systemd, because it seems to be the way that Debian is going. I want to run Xorg in a chroot on hardware, rather than using networking (which seems to be the canonical way ...
4
votes
1answer
77 views

Automate chroot into broken system

Every time you have to mount a system with a live-boot-CD and chroot into the system to repair grub, you have to type so many lines to mount into the right partition: fdisk -l find the right ...
2
votes
0answers
83 views

How to use chroot'd desktop environment on Android with external display, mouse and keyboard?

I have a chroot'd Arch Linux environment set up on my Android phone (a OnePlus One) and I would like to connect it to a monitor (directly or with use of some sort of passthrough/adapter eg. Raspberry ...
1
vote
1answer
114 views

chroot for sftp user

I followed multiple guides on the internet on how to restrict a user so that he cannot change/see files outside of his home directory. So I created a user, let's call him john and I also created a ...
1
vote
1answer
2k views

How can I chroot into a live filesystem.squashfs Linux distribution?

I would like to chroot into a Live USB Linux distro, if such thing is possible. I don't know if there is a generic method, so I will detail my specific test. I am testing Kali Linux v1.0.5 Live USB ...
1
vote
1answer
50 views

Deterministic method to find out whether some other process is in a chroot jail and where?

NOTE: I'm familiar with this U&L Q&A titled: How do I tell I'm running in a chroot? that sounds similar to what I'm asking, but there's a subtle difference to what I'm looking for. That ...
2
votes
2answers
187 views

How to use/test pivot_root?

I want to test the pivot_root command which moves the root file system of the current process to the directory put_old and makes new_root the new root file system. But I always get the following ...
11
votes
1answer
4k views

How can I access a directory outside a chroot from within it?

I have a user which is chrooted to her home directory, but I want her to also be able to manage files within /var/www. As such, I did the following: root@server:/home/username# ln -s /var/www www ...
0
votes
1answer
36 views

How can I convert a chroot into a GRUB2 bootable ISO image?

Say I have a chroot containing what will be a working Linux system, and some additional init scripts to mount an overlay filesystem (e.g. AUFS) over it. I've also generated a GRUB2 boot menu. What ...
0
votes
0answers
28 views

Where to create virtual link for chroot?

I've tried to pass this step of lfs but when i put: chroot "$LFS" /tools/bin/env -i I got: chroot: failed to run command '/tools/bin/env': No such file or directory So i search about it and ...
3
votes
1answer
108 views

chroot into a sshfs folder

I am trying to chroot into a sshfs-mounted directory: mkdir remoteroot sshfs remote:/ remoteroot/ sudo chroot remoteroot/ but I get chroot: cannot change root directory to remoteroot/: Permission ...
0
votes
0answers
44 views

Are system calls available in a chroot environment?

I'm experiencing a lot of compilation errors regarding missing system calls (e.g. error: '__NR_name_to_handle_at' undeclared (first use in this function)) with different projects (ganesha 2.1.0 ...
4
votes
2answers
111 views

Could you explain this “chroot” /tmp directory creation?

In the following linked article they explain how to create a "chroot" /tmp directory. I'm a bit confused by what they did. Could someone explain what the following commands are doing? Noexec and /tmp ...
1
vote
1answer
91 views

Limit access on external drive mounted and used by sftp

I've got a unix user "popolo" who is chrooted in /srv/ftp/ and I mount my two external drives by /etc/fstab in /srv/ftp so I have /srv/stp/dude and /srv/ftp/sweet. Popolo has access to those drives ...
2
votes
1answer
67 views

How does chroot's use of qemu for cross compile environments work?

To be able to do cross compiling there's a trick where you copy a static qemu binary into your <different-arch-root-to-be>/usr/bin and when you chroot into that filesystem, which has non-native ...
0
votes
0answers
66 views

How to setup a scanner in crouton chroot?

I have ubuntu 12.04 installed on my hp chromebook using crouton but I'm not sure how to access a usb device from inside the chroot. I'm trying to access a brother DS-720D scanner with xsane. From ...
3
votes
2answers
94 views

How can I force chrooted programs to use a virtual ethernet device?

First off, this is not for security reasons, or for use in a production environment. It's because I want to mess around with different configuration management systems on relatively low-spec ...