a linux command to change the filesystem root a process can see, limiting it's access to the real filesystem root

learn more… | top users | synonyms

39
votes
2answers
74k views

How can I chroot sftp-only SSH users into their homes?

I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see. I've created a user called bob ...
36
votes
3answers
5k views

What are the differences between sudo, su, visudo, chroot, and gksu?

What are the differences between sudo, su, visudo, chroot, and gksu ?
20
votes
4answers
27k views

Simple & easy way to jail users

I need a simple and easy way to jail users in their home directories in Oneiric. Do you have a simple configuration for jailing users, with full help, or some good web links? I would be offering an ...
14
votes
3answers
3k views

What does “${debian_chroot:+($debian_chroot)}” do in my terminal prompt?

In my terminal prompt definition in my .bashrc file, among other things, I have this snippet of code: ${debian_chroot:+($debian_chroot)} What does this do, and do I need it?
14
votes
3answers
4k views

How do I stop all processes in a chroot?

I have a number of LVM partitions, each containing an Ubuntu installation. Occasionally, I want to do an apt-get dist-upgrade, to update an installation to the most recent packages. I do this with ...
12
votes
3answers
45k views

During a chroot attempt, I got this error: “chroot: failed to run command '/bin/bash': Exec format error”

I was following the instructions of this tutorial HOWTO: Purge and Reinstall Grub 2 from the Live CD, when I encountered an error at step 1, as I launched the command sudo chroot /mnt/temp The ...
10
votes
2answers
44k views

How to setup a SFTP server with users chrooted in their home directories?

I have been trying to set up a SFTP server with multiple users chrooting into their home directories. I followed the advice on this guide and then executed the following commands on the user's ...
7
votes
2answers
251 views

How do I create a chroot of an earlier version of Ubuntu?

I'd like to create a virtual instance of the latest LTS so I can test the software I'm writing in a way that more closely matches our production environment. There seem to be many, many different ...
7
votes
1answer
792 views

Mounting a network filesystem into schroot

I'm using a network file system (AFS) and I would like to also mount it into my schroot. Adding a line to /etc/schroot/mount-defaults, with bind or rbind in the options didn't help: schroot always ...
6
votes
1answer
537 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. ...
6
votes
2answers
278 views

How to build packages for Maverick while running Lucid?

I would like to be able to build a package for the Maverick distribution release of Ubuntu, while running the Lucid distribution release. I found this page: https://wiki.ubuntu.com/DebootstrapChroot ...
6
votes
1answer
1k views

debootstrap failing to mount /proc

I have researched this, and none of the answers (so far) on here, nor googling seem to match my problem. Here is the situation: I am running Xubuntu 12.04 as a base install, and am trying to set up ...
5
votes
1answer
2k views

How do I add more variants or custom packages to debootstrap?

I have a set of packages that I wish to install along-side the minibase variant in debootstrap. I'm having the hardest time figuring out how to customize variants so that more than just the base is ...
5
votes
1answer
2k views

How to chroot Ubuntu+1?

What is the recommended way to use chroot from Ubuntu Stable (in my case 11.04) with Ubuntu+1 (11.10)? Linked (but probably separate) is "Is there anything special that I need to do in order to get ...
5
votes
2answers
2k views

Upgrading Ubuntu chroot environment?

What is the proper way to upgrade Ubuntu chroot environment to a newer Ubuntu release? The chroot environment has been originally set up using debootstrap. The proper way to upgrade a Ubuntu server ...
4
votes
1answer
3k views

Is there an easier way to chroot than bind-mounting?

Most of the time I use the chroot to rescue an existing installation from usb. When I chroot into another system I have to manually bind-mount proc, sys, dev and dev/pts by issuing for example: ...
4
votes
2answers
5k views

Chroot into a 32-bit version of Ubuntu from a 64-bit host

Xilinx webPack 10.1 requires 32-bit Linux. Only this old version is compatible with their boards. How to make 32-bit applications work on a 64-bit operating system lists: Installation of 32-bit ...
4
votes
1answer
862 views

What is the difference of chroot, dchroot and schroot?

What is the difference of chroot, dchroot and schroot? What do they have in common? Where are the differences? Which one is needed for what?
4
votes
2answers
2k views

How I can run ubuntu in chroot on Android?

I want to run fully functional Ubuntu on my Android device in chroot. But I have some trouble with upstart. In chroot "it will actually run /sbin/telinit", so how i can run upstart or replace it with ...
4
votes
1answer
529 views

How to boot from a debootstrap based install?

I would like to boot a testing Ubuntu release from a directory (which contains a debootstrap based install). As far as I understand I just need someway to tell the boot process (initrd scripts?) that ...
4
votes
1answer
99 views

Fake program runtime environment

Is it possible to run a program in a fake environment? I have a tool that requires a certain folder to be in /mnt/cdrom. I have the all the files from that cdrom stored in another folder, say ...
3
votes
1answer
991 views

Install FTP server with support for virtual users

I'm trying to install an FTP server on Ubuntu 11.04. I've installed vsftpd, but I had no success in getting it to work with virtual users. I want to be able to have give fake users and direct them to ...
3
votes
1answer
1k views

How to chroot into persistent installation?

To chroot into 'normal' installation requires just mount of common /, /proc, /sys and /dev to do normal administration tasks. But how to proceed with so called 'persistent' installation (see here)? ...
3
votes
2answers
8k views

Need ProFTPd to follow symbolic link

I have 2 folder: /var/www/project1/ /var/www/repository/module/ and I have this symbolic link: /var/www/project1/module/News => /var/www/repository/module/News I know the target is outside the ...
3
votes
1answer
415 views

How to run `gsettings set` in chroot? [duplicate]

I ran the following command in chroot environment without X: gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true I get the following error message: (process:8290): WARNING ...
3
votes
1answer
947 views

Install program from source to chroot env

I have an program source (Remmina) and want to install it to chroot environment. Remmina uses cmake system. I can install it to chroot using: sudo make install DESTDIR=mychroot but this is not ...
3
votes
2answers
1k views

Ubuntu chroot “No such file or directory”

I have a web application where I create some folders on my server and put executables there. Then I try to run them with chroot but I get a message that access is denied there. I tried chmod -R 777 ...
3
votes
1answer
311 views

Need to write a script that will jailkit a user and give them access to a particular website directory

I have a ubuntu 12.04 app server hosting a few websites. We need to give access to the developer to only be able upload files to one of the websites. I have installed Jailkit but can't seem to find ...
3
votes
1answer
939 views

upgrade a kernel when in chroot. how to?

I am trying to build a custom cd using uck. Now, i want to upgrade the kernel, remove the old kernel and then create the iso. I am able to upgrade the kernel but I am not able to switch to the new ...
3
votes
0answers
270 views

Cannot install into target mounted with noexec or nodev while doing qemu-deboot strapping

I'm trying to install the armel version of Ubuntu with qemu-deboot-strap on my desktop X64 system,but I've found this error : $ mkdir precise $ sudo qemu-debootstrap --arch=armel precise ./precise/ ...
3
votes
0answers
638 views

What are the differences between jails and chroot?

I'm currently trying to point out the finer details between chroot spaces and jails. And clear up some of the controversy in the phrase "chroot jail." So far I have chroot defined simplistically as ...
3
votes
2answers
1k views

Video driver under lxc container?

Since LXC (Linux Containers) is a kernel level super-chroot, I've been wondering what sort of video driver the containers have: My host is Ubuntu 12.04 64-bit machine with ATI gpu. Will the LXC ...
2
votes
4answers
3k views

Why does the sudo command not work in chroot?

I just installed a 32-bit chroot to run on my 64-bit system. In the chroot environment, the sudo command doesn't work, it says sudo: command not found Also, when I try the su root command, my ...
2
votes
6answers
840 views

What exactly is a chroot? Is it similar to a simultaneous dual boot?

It has been suggested to me that the use of a chroot might solve my problem of building an application that must run on an embedded device. I have inferred from this description that it is somehow ...
2
votes
1answer
9k views

Give ftp users access to directories outside their root using symlinks

I tried to give proftpd virtual users access to directories outside their home paths using symlinks I created as root through the console. /var/ftp/users/test is the home of the user named test. ...
2
votes
2answers
1k views

using DNS lookup in chroot postfix

I'm trying to set up a postfix set up on my client machines. All machines should use a central ldap directory for common postfix (e.g. aliases, etc). But since postfix runs in chroot postfix is unable ...
2
votes
1answer
248 views

How to replace /lib/modules in chroot?

I have mounted my system where my modules were accidentally deleted, ALL of them, all of the OLD ones, and the most recent ones 3.2.41. I have mounted my system and I'm chroot and I don't know what to ...
2
votes
2answers
9k views

Changing write permissions for jailed SFTP denies login

I have scouted over many websites and forums on how to setup an SFTP user that is jailed to a certain directory using CHROOT. Here are the steps I have followed but I can't seem to get write ...
2
votes
1answer
790 views

Can't chroot to recover Ubuntu 64 bits

I was trying to get steam for linux to work on my Ubuntu 10.04 LTS 64 bits system. I installed these three (some 32 bit) packages: http://packages.ubuntu.com/quantal/libc-bin ...
2
votes
1answer
619 views

Clean up Chroot

Is there way to quickly clean up or revert your chroot to its previous new state, without reinstalling or re setting it up, so I could start fresh again?
2
votes
1answer
90 views

SFTP chroot configuration error

Can anyone see what I have done wrong in this procedure? I can connect to the server as the new user and am in the chrooted directory, but despite setting all the proper root permissions, I cannot add ...
2
votes
1answer
1k views

How to configure SFTP to login in the “/” directory?

I want to login as root and make the / as the default directory in SFTP. Newbie help needed
2
votes
0answers
108 views

Ubuntu for Android, Ubuntu for Devices, LinuxonAndroid project for Ubuntu on ARMv7 machine?

I've looked around but can't find any solid solutions or help on this topic. I recently ordered a machine with an ARMv7 CPU (Cortex A-9, <= 1.6GHz, quad core). The machine also has a Mali-400 ...
2
votes
0answers
288 views

How do I chroot an SSH user to their home directory?

I don't want to use jailkit. My OS is Ubuntu 14.04. I am setting up a user account on my server for a kid I tutor, so he can run a minecraft server. He will be using putty to ssh into my server, and I ...
2
votes
0answers
112 views

Is it possible to compile a kernel module under chroot?

Under a chroot environment, is it possible to build a kernel module without having the kernel installed, just the headers? It sounds like something you wouldn't want to do, but in my case I do. I've ...
2
votes
0answers
460 views

Why does mounting proc in my chroot fail during debootstrapping?

In a cleanly installed Ubuntu Raring machine I am trying to perform a debootstrap of another system. Here's the exact command: http_proxy=http://192.168.122.1:8000/ debootstrap --arch=amd64 raring ...
2
votes
2answers
379 views

How to install program from Live-CD chroot?

I am using Lubuntu 13.04. How can I install programs from a Live CD from chroot?
2
votes
0answers
227 views

ssh-agent not accessible within a schroot

I'm using an schroot to do some builds of deployment packages, and there's a lot of to and fro between the host and the schroot environments. Within the schroot the ssh-agent doesn't seem to be ...
2
votes
0answers
166 views

Is there a proper way to set up a copy-on-write based build env that use your live / as base files?

I'm trying to set up a build environment using chroot, but instead of downloading ubuntu base files, I want to use my live / as base files for the chroot and use c-o-w to redirect any changes made in ...
2
votes
0answers
134 views

How I can run Android 4.0.4 in chroot on Ubuntu 12.04 on the Pandaboard ES?

I want to run fully functional Android 4.0.4 on my Ubuntu 12.04 installation on the Pandaboard ES with the LXC containers.