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

0
votes
0answers
11 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 ...
1
vote
1answer
46 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
45 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
50 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
60 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
23 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
30 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 ...
1
vote
1answer
29 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 ...
0
votes
0answers
30 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 ...
3
votes
1answer
63 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 ...
2
votes
0answers
36 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
83 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 ...
4
votes
1answer
63 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 ...
1
vote
1answer
44 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
66 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 ...
0
votes
1answer
23 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
21 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
49 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
37 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 ...
1
vote
1answer
47 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 ...
4
votes
2answers
63 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 ...
2
votes
1answer
43 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
41 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
65 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 ...
2
votes
1answer
93 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
45 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
174 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
100 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
64 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
62 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
83 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
107 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
118 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. ...
1
vote
2answers
8k 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
181 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
97 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
419 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
55 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
124 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
411 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
771 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
141 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
1k 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
77 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
359 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
109 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
45 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
190 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
1k 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 ...