a linux command to change the filesystem root a process can see, limiting it's access to the real filesystem root
Questions tagged [chroot]
354 questions
156
votes
4 answers
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?
fouric
- 4,698
147
votes
5 answers
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 and added him to a new group called sftponly. They…
Oli
- 299,380
55
votes
5 answers
How to automate setting up of "keyboard-configuration" package?
I'm writing a script to install Ubuntu 16.04 server into a chroot jail, using debootstrap (on an Ubuntu 16.04 server machine).
During the setting up of the keyboard-configuration package it asks for the keyboard type:
Setting up…
fadedbee
- 828
- 1
- 7
- 16
48
votes
3 answers
What are the differences between sudo, su, visudo, chroot, and gksu?
What are the differences between sudo, su, visudo, chroot, and gksu ?
lambda23
- 3,362
43
votes
4 answers
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 online free public server with 10 to 20 GB free…
One Zero
- 27,761
28
votes
6 answers
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 error was the following:
chroot: failed to run command…
Grand Oxymore
- 749
26
votes
5 answers
How to set up 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 (Archive.org link) and then executed the following commands on the user's directories
chown root:root…
Nitin Venkatesh
- 22,739
26
votes
1 answer
What is the difference between chroot, dchroot and schroot?
What is the difference between chroot, dchroot and schroot?
What do they have in common?
Where are the differences?
Which one is needed for what?
24
votes
1 answer
How to resolve hostnames in chroot?
I try to repair an broken Ubunu 14.04 with chroot. What I did, is to boot Ubuntu from USB mounted the original system that has to be repaired and changed to this system with chroot:
sudo mount /dev/sdXY /mnt
sudo mount -o bind /dev /mnt/dev
sudo…
user5950
- 6,406
18
votes
6 answers
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 chroot - the process is usually something like:
$…
Jeremy Kerr
- 27,829
16
votes
2 answers
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 permissions to work.
Setup
sshd_config
#Subsystem sftp…
onggie
- 351
- 1
- 2
- 6
12
votes
2 answers
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 ways of doing this: use debootstrap with schroot;…
jml
- 1,035
11
votes
2 answers
How to convert a iso9660 ISO to a USB ISO
I have an ISO of customized GCompris based on Ubuntu. It is intended to be burned on a CD (iso 9660 FS Type). When I try to burn it to a USB, the pendrive "becomes" a CD and it won't boot...
The guy who made this ISO as a school project a while…
Pinguinim
- 1,498
11
votes
1 answer
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/
I: Running command:
$ debootstrap --arch armel…
Marietto
- 635
- 4
- 13
- 40
11
votes
2 answers
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 is to use do-release-upgrade command.
Ubuntu is…
snap
- 426