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

2
votes
1answer
338 views

Debian chroot blocking PTTYs on host

I've created a Debian-based chroot environment using debootstrap under Arch Linux, and fill it with life like this: #!/bin/sh mount -t proc proc $CHROOT/proc mount -t devpts devpts $CHROOT/dev/pts ...
1
vote
1answer
181 views

32-bit on 64-bit: memory usage for multiple processes

I'm working on a Linux hosting solution for game server software, however the software in question is 32-bit and I'd be running 64-bit on the host. Now, I know I can run 32-bit apps on a 64-bit host ...
7
votes
1answer
218 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 ...
0
votes
3answers
426 views

TERM variable in chroot

I've created a chroot with the help of jailkit and now I'm trying to install some other libraries and tools. First I tried to install clear library. I've copied the file from the /bin folder and ...
8
votes
2answers
35k 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 ...
2
votes
0answers
298 views

How do I run Gnome from a systemd-nspawn container in a second X server?

I'm using systemd-nspawn to "boot" a second Linux OS from a USB hard disk. I'd like to launch that OS's Gnome Desktop in a second X server running on the same machine on a different tty than the ...
3
votes
0answers
220 views

Running (X) Xfce4 in Debian chroot

I was trying to start Xfce4 in a chroot. The problem is that Xfce4 starts, shows default the UI but the USB keyboard and mouse are not working. My chroot script: #!/bin/bash mount --bind /dev ...
1
vote
1answer
476 views

grub-install --no-floppy /dev/sda fails (Funtoo)

I am trying out Funtoo on a new machine. I've been through the installation process, as described in Funtoo Linux Installation . Specifically, the installation is done from within an existing Linux ...
3
votes
1answer
445 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
1answer
681 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 ...
-4
votes
3answers
131 views

Linux prompt missing brackets

I'm using centos in my VPS server and guest system. There're two logins for a guest system. One is root and one is regular. After I mounted the guest system and chroot to the mounting directory, I ...
2
votes
1answer
478 views

Share a directory over FTP with chroot_local enabled

I'm using vsftpd. By default, when I create a user, they are jailed in their directory which is /home/user. I have enabled chroot_local_user=YES. On the other hand, I also wanted to create a shared ...
2
votes
1answer
500 views

Cannot open GUI after ssh -X and chroot

I ssh ( with -X option ) to another computer then I I do a chroot. I then encounter problems running X11 apps. As one example, after the ssh I would run emacs and it would open a new window as a X11 ...
2
votes
1answer
772 views

How to achieve the effect of chroot in userspace in Linux (without being root)?

The goal is to install and run programs in a displaced (relocated) distro (whose / must not coincide with the global /) inside a host Linux system. The programs are not adapted for using a different / ...
0
votes
1answer
4k views

Chroot in to reinstall Grub2 reinstall, mnt/ is empty

I have a common problem: I installed Fedora 18 on my PC that has Windows on it. When I start the PC I don't get asked which system I want to boot, Windows is chosen always. So I found out that I ...
1
vote
1answer
1k views

Set up chroot for LDAP users in RHEL6

I have been working on this for 2 days now and am about to give up so someone please help. I have a Red Hat 6 server joined to my active directory domain. Logins work just fine under normal ...
1
vote
1answer
299 views

Chrooting into ArchLinux iso installation environment

I'm trying to install ArchLinux, but my laptop hangs whenever I have any bootable media attached (other than the primary disk luckily). I tell you this, not because I'm looking to fix my laptop ...
4
votes
3answers
1k views

Restrict ssh login from LDAP to users who have a /home directory

I have an Apache server (RHEL 6) hosting multiple user web pages which currently is connected to my Active Directory environment to authenticate users. The server is used to automatically host content ...
2
votes
0answers
363 views

remount chrooted read-only subdirectory (non-mountpoint) to read-write from within jail?

I'm trying to do the same of this question (multiple linux installation on same filesystem) but I get this result (root filesystem mounted as read-only) . I'm using debian/sid, have successfully ...
4
votes
1answer
356 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 ...
0
votes
0answers
136 views

Creating a Safe Web Server

Web server hosts multiple websites. Multiple users update each website. User home directory /home/user1 /home/user2 Web directory /var/www/site1 /var/www/site2 Each user uses SFTP to upload ...
4
votes
1answer
1k views

How can I mount a directory of the host system for use inside a FreeBSD jail?

I am performing the following on FreeBSD 9.0-STABLE: mount_nullfs /foo /jail/foo After that, from within the host system, the mount works. So this works: touch /foo/bar && ls /jail/foo/bar ...
1
vote
1answer
227 views

Implement ProFTPd server without chroot

Can I use ProFTPd without using a chroot jail (thereby preventing access to anything outside of the FTP root)? I have a requirement to have symlinks in my FTP source that point to locations outside of ...
3
votes
1answer
3k 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/ # ...
0
votes
1answer
255 views

SSH minimal rights user - su only [duplicate]

Possible Duplicate: Creating a UNIX account which only executes one command I am trying to setup a user account that only has as minimal rights as possible. The user should be able to log ...
2
votes
1answer
113 views

Is it possible to log directly into chroot?

Lets say I boot up my computer and I see the login screen. When I log in as myuser, I want to be restricted to a certain root directory via. chroot. Let's assume that the directory is ...
1
vote
1answer
1k views

How to chroot into busybox environment?

i have a filesystem build with buildroot, to compile code for a device using a old kernel and uClibc. Now i want to chroot into the fs. The problem is, i dont have /bin/bash, just /bin/busybox. How ...
2
votes
1answer
598 views

Sudo does not work in chroot

I would like to be able to use the sudo command in a chroot environment. I start the chroot as follows: chroot /debian-squeeze /bin/bash Now I'm logged in as root in the chroot. I can do su user ...
3
votes
2answers
3k views

getting 553 - cannot create file in vsftpd (ubuntu 12.04)

I'm trying to setup a ftp account for a user that has read/write access to one folder: /items/myuser I've set up the account with username 'myuser' in Linux with the adduser command. After that, I've ...
8
votes
1answer
3k 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 ...
3
votes
1answer
8k views

How to restrict ssh users to browse only /home/%u contents

Can I confine my users to their /home/%u directory using only OpenSSH configuration? From instructions I found on the Internet, I stopped the SSH server and appended the following to the sshd_config ...
2
votes
2answers
691 views

Chroot Risks w/ /dev and /proc

I am planning to set up a few chroot jails for some users to run/test Java applications (lets just assume each application is untrusted). Is there any risk involved with mounting /dev and /proc into ...
4
votes
2answers
543 views

How to rsync a chroot without breaking symlinks?

I'd like to rsync (backup) a chroot environment from outside the chroot. For that I first make a lvm snapshot of the chroot volume and then run rsync on that. The only problem with this approach: ...
2
votes
1answer
792 views

SFTP: give user access to folder outside home

I have a machine running Ubuntu 12.04 LTS with OpenSSH server installed. I have created a user with a jailed home account. When I log in with the user's account, I can only access his home (duh). ...
2
votes
0answers
120 views

How to find current chroot jail path on Linux <2.6.26

While running kernel 2.6.26 or newer it's possible to get the path of the current chroot jail by comparing the mountinfo of the current process and the init process. Is there a way to get the same ...
2
votes
1answer
2k views

How to run Firefox in a chroot jail?

I've got this chroot jail all setup. I try to run Firefox in it, and get the message: "Gtk-WARNING ** cannot open display: " I know I have to invoke Firefox with --display= something. I probably ...
2
votes
2answers
1k views

GParted LiveCD: Is there a version with a 64-bit kernel?

I'm trying to chroot with the GParted LiveCD onto an existing 64-bit system, attempting to fix grub.
1
vote
1answer
334 views

MBR is toast or at least Grub is

This started after some kernel trouble that I left alone for a while. I had miscompiled a kernel then tried to re-compile it and started to organize a list of boot options in grub for differently ...
2
votes
1answer
588 views

Building GCC inside a chroot from source

In a previous question I asked about creating a chroot that simulates my embedded device environment. It was suggested that I build from source GCC and binutils first inside my chroot. To attempt this ...
1
vote
1answer
621 views

Start SSH session in some other directory than their home directory and lock them there

I've set up a SSH server which I've let some friends log into, both via SSH and FileZilla. I put a symbolic link to two hard drives in their home directories so that they could access some files. This ...
9
votes
4answers
10k views

How can I chroot into a filesystem with a different architechture?

I'm trying to chroot into a Arch Linux ARM filesystem from x86_64. I've seen that it's possible to do using static qemu by copying the binary into the chroot system: $ cp /usr/bin/qemu-arm ...
4
votes
1answer
314 views

Can you Chroot a program from an OpenVZ environment?

I just recently purchased a Virtual Private Server, and it is OpenVZ virtualization. I am setting up my LAMP stack, and in the past I have always just set up my BIND dns set up in a chrooted ...
4
votes
3answers
1k views

Boot Linux system from a subdirectory on a partition?

I would like to try to set up a computer so that it has multiple Linux installs all in the same filesystem. For example, the filesytem would have 3 folders: /Ubuntu_Precise, /Ubuntu_Oneiric, and ...
1
vote
1answer
2k views

Is it possible to make a chroot -bind with debian under mac os x lion?

Within Linux (e.g. Ubuntu), it is possible to mount partitions like /home, /etc, /lib from another Linux machine and bind them to /proc /sys /tmp to the host's to actually take control of the mounted ...
3
votes
1answer
805 views

When can one reboot from inside a chroot environment?

Sometimes when I chroot into some folder , I could use reboot to reset my box, but sometimes I can't. So I want to know why I could do that sometimes and why. UPDATE The chroot environment is ...
4
votes
2answers
4k views

Disable direct login for normal users (like oracle) in linux but allow scp and sftp?

Is it possible to disable direct login for normal users (like oracle) in linux but allow scp and sftp for that use?
6
votes
1answer
1k views

chroot fails with --userspec when chroot is i686

I'm experiencing a problem with chroot... I'm running on Arch Linux x86_64. I have a 64 bit chroot and a 32 bit chroot. They are identical except that one is 32 bit and one is 64 bit. I can enter ...
2
votes
5answers
2k views

How to completely hide stuff from a user?

I want to let some of my friends access my computer by making them user accounts. They will mostly access my computer by sftp and ssh, but they could also sometimes access it at my home. However I ...
2
votes
2answers
1k views

OpenSSH, chroot user: Root needs to own the user directory, is there any consequence?

I want to create an account for my friend on my computer, but I don't want my friend to be able to view all my files. I saw that with OpenSSH, there is an option for that. Inside the SSHD ...
5
votes
1answer
352 views

Why is it possible to leave CHROOT with this sftp config?

I'm trying to create the user lenny, that has read and write permissions in the folder /home/lenny/ and has no shell but only access via SFTP. I'm doing the following: useradd lenny mkdir /home/lenny ...