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
18 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
15 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
45 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 ...
1
vote
1answer
34 views

Why does chroot get ENOENT on an existing file?

;TL-DR - Answer: because the dynamic linker ld-linux-x86-64.so.2 was missing. I have mounted a squashfs (shouldn't matter) filesystem -ro,loop at /mnt/foo. It contains among other things the ...
0
votes
1answer
32 views

ARM cross compilation package not found

I'm trying for arm cross compilation on my i386 machine using sysroot and chroot.I want to set environment variables like PKG_CONFIG_PATH to sysroot.Right now my code is not compiling because it is ...
2
votes
1answer
93 views

How to build gcc inside a Debian chroot?

I used debootstrap to set up a minimal Debian system (x86): debootstrap wheezy /var/chroot http://ftp.debian.org/debian/ Then I entered the chroot and installed some packages: apt-get install ...
3
votes
2answers
45 views

chroot jail that can access the filesystem

chroot jails seem to be simply a different world, with no interaction with the actual filesystem. Thus, the entire environment has to be replicated inside the chroot, which would mean making a full ...
2
votes
1answer
25 views

where does Cron look for the default mail binary?

I have setup Cron Jobs to run inside a Chroot Environment, depending on the User/Group; I have noticed that these cron jobs, running inside the chroot environment, fail to send any mail. Log files ...
2
votes
1answer
52 views

How do I limit local user file system access? What is the best method?

I have a Linux installation with a default user and an admin user (and root). On startup, the default user is automatically logged in and a particular application is launched. My intention is to ...
1
vote
2answers
35 views

How to create an environment for libraries and binaries?

I have a tool that cannot be run under my Desktop Linux. So I'd like to make a folder that contains all its requirements, and run it in the folder. Virtual machine or container is not a solution here ...
0
votes
1answer
63 views

Can I use a shell or python script to execute commands in a chroot?

I need: to make a shellscript which can chroot into a linux environment and run a command there. I am using: arch-chroot (on the arch linux livecd)
3
votes
1answer
85 views

Backtrace of “git clone” running inside qemu-user-emulation based arm-chroot

I'm running a wheezy:armhf chroot using qemu user emulation on my jessie:x86_64 system. Somehow, a git clone on a particular private repository will hang inside the chroot, while succeed natively. ...
0
votes
2answers
4k views

chroot: failed to run command ‘/bin/bash’: No such file or directory [duplicate]

When I run the chroot command an error is given: failed to run command ‘/bin/bash’: No such file or directory
1
vote
1answer
30 views

How to correct error where 2 out of 3 users on chrooted network cannot gain write access?

I have an SFTP server running on Debian. The directory is chrooted and is set up with privileges as such: /sftp/+---testagent2----writespace 750 | 755 755 ...
3
votes
2answers
93 views

replicate and isolating user environments on the fly

I will be using Ubuntu Linux for this project. For training of a particular application at a conference I need: To have each student be able to ssh into the same user account on a server Upon each ...
1
vote
1answer
67 views

Different fakechroot behavior on Fedora and Ubuntu

Consider the following directory tree (mychroot): mychroot/ ├── proc │   └── cpuinfo └── usr └── bin └── ls On Fedora 20: $ fakechroot chroot ./mychroot/ /usr/bin/ls proc cpuinfo ...
2
votes
1answer
224 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 ...
4
votes
1answer
48 views

Seperate messages of multiple sshds in syslog-ng

Is there a common way of distinguishing between the messages of multiple processes in syslog-ng beside setting different facilities? +1 if filtering and therefore logging in different files would be ...
4
votes
0answers
113 views

Unable to view mounted directories in a chroot [closed]

Here is a quick description of what I have done: I have a chrooted user (username: clientdev) which I have jailed inside their home directory. This chroot directory is /home/clientdev/ which is ...
6
votes
3answers
399 views

Why are web servers traditionally started as superuser?

Thinking about a future web server setup, it struck me that for some reason web servers usually start as root and then drop certain rights (setuid) for the worker processes. In addition there is often ...
1
vote
1answer
332 views

Create ssh user which can only access home directory [duplicate]

I read documentation on the internet on how to create a new user with SSH access. I figured it out and to create a user is quite simple. The next step I want to take is to jail this ssh server to the ...
3
votes
2answers
114 views

Denying “/opt/” access for SFTP Users other than particular dir

This is my first (newbie) post here in unix stackexchange. I want to use my WebServer (Debian) as SFTPServer giving access to particular employees. The dir structure is as follows under root: ...
1
vote
1answer
714 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 ...
2
votes
1answer
63 views

Unable to connect after ChrootDirectory within sshd_config

After adding the following to my sshd_config file... Match user myuser ChrootDirectory /var/www/html X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp I am unable to ...
0
votes
1answer
259 views

Run Java in a chrooted jail

I'm on a CentOS 6.5 machine with Plesk Panel which I used to create a chrooted environment for a user who can access it via ssh. I'm not a big expert but somehow I managed to let him use some basic ...
1
vote
1answer
94 views

Correlation between CHROOT and Crouton - -

I am trying to understand what purpose/function of CHROOT and how using it with Crouton will allow you to use certain Linux distros and libs. Does CHROOT essentially create some kind of a ...
1
vote
2answers
42 views

Automated test for install script

I'm writing an install script for an appliance that modifies system config files under /etc (amongst other things). How can I test this script non-destructively? Ideally I would like to run the ...
2
votes
1answer
154 views

How to copy a debootstrap (chroot) directory to another computer?

I created an installation of Debian in a subdirectory using debootstrap on computer A. Now I would like to transfer this installation to computer B which has a local connection but no global internet ...
1
vote
3answers
819 views

Allow User To Access Other User's Home Directory

I have a Fedora server. I would create an SFTP user account which is allowed to access other user's home dir. Is it possible? For example user1 -> /home/user1 user2 -> /home/user1 user2 can ...
2
votes
2answers
461 views

Pivot root between two Linux installations

I have two Linux distributions installed (Debian and Ubuntu). Each with its own usr, swap, and whatever. Both are completely independent, each in its partition. According to the man pages, I could ...
1
vote
3answers
288 views

HowTo Chroot to BSD

I recently tried FreeBSD [9.2]. I installed it but as i found out it doesn't install any bootloader by default. So now i want to find out HOW it is possible to chroot to the installed BSD via a ...
3
votes
2answers
1k views

Chroot SFTP users who require access to multiple directories under same parent folder

I have a RHEL 6 server with a /Documents directory, and it has child directories 1 2 3 4 5.... right under the /Documents directory. Is it possible to create an SFTP chroot jail that only gives a ...
0
votes
1answer
45 views

Sandbox alike solution for linux

I wonder if there is a kind of a sandboxing solution for linux, sometimes there is more than one app that is candidate to solve my problems, in that case I want to try all of them to get the one which ...
1
vote
1answer
121 views

vsftpd does not allow chrooted users write to directory

I installed vsftpd on ubuntu 12.04 and chrooted local users, in order not to let them see the other parts of system. but when a local user wants to login into ftp it gives out this error: 500 OOPS: ...
2
votes
1answer
101 views

SFTP chroot jail/access based on wildcard

I want to give a list of people SFTP access to /webdocs/ABC* where they will read-write access to only directories that match this wildcard. How do I do this? Can I create a chroot jaill or some ...
1
vote
0answers
77 views

How to send a running process to jail?

"Go directly to jail; do not pass go, do not collect $200" — Monopoly Is there any way to make a running process's all future file access behave as if it has always been in a chroot environment?
2
votes
2answers
138 views

How to have a chroot system mount shared with its host?

Say I chrooted into ~/myroot with its /mnt being bind-mounted from the host's /mnt. Now (from within the chroot environment) I want to e.g. mount /dev/something /mnt/something such that not only the ...
2
votes
1answer
580 views

How to properly use Gentoo Linux as a supplement to an existing distribution?

While I originally wanted to entirely replace the Linux distribution my NAS uses, I meanwhile came to the conclusion that it would be better to leave the existing system as unmodified as possible and ...
0
votes
1answer
153 views

Can't create a minimal chroot jail

Was trying to create a minimal chroot jail. The steps followed was: Created a folder chroot Copied bash to the folder chroot Run ldd bash to know the dependencies ldd /bin/bash linux-vdso.so.1 ...
1
vote
1answer
874 views

How to assign an additional IP/hostname to a chrooted environment?

While I can simply have e.g. sshd in a chroot environment ("chrootenv") listen to a different port than its parent ("parentenv"), it would be more convenient to have that environment have an ...
0
votes
1answer
155 views

rm -rf on vhosts directory, what should I do?

I was tired and unfortunately I did: rm -rf * /var/www/vhosts repertory on my CentOS 6.3 running with Parallel Plesk. I lost many websites, but worst: I've lost chroot, default, fs and fs-passwd. ...
6
votes
2answers
221 views

Which of proc, sys etc. should be bind-mounted (or not) when chrooting into a “replacement” distribution?

This answer to another question basically boils down to chrooting into another Linux distribution in order to mainly use that as a replacement to its too restricted (but irreplaceable) parent. The ...
2
votes
2answers
187 views

How do I `umount` /proc?

I am following this tutorial on how to do a firmware update to my NAND flash. I followed it only changing the directory where I am placing my new root. I am copying all of the /bin /dev /sbin /usr ...
1
vote
1answer
1k views

Unable to get Wireless working during Arch Linux install

I'm following the Arch Linux install guide here: https://wiki.archlinux.org/index.php/Beginners%27_Guide I'm installing from a live disc. I've just used pacstrap to install the base system. I then ...
0
votes
2answers
299 views

Cannot create root jail

I just tried to play around with chroot command only for testing purposes, in order to create a temporary root jail, but I didn't managed to. The platform is CentOS 6.4. and I have done it numerous ...
3
votes
2answers
18k views

vsftpd - Limit FTP access only to /var/www

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 ...
1
vote
1answer
297 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 ...
2
votes
1answer
38 views

Does `build_packages` download all libraries again in the case of a failed build?

I have been trying to set up and build an image of the Chromium OS from the instructions available here. My laptop was running the build_packages script for about 7-8 hours after which it failed on ...
2
votes
1answer
322 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
174 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 ...