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

3
votes
1answer
3k 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 ...
4
votes
1answer
902 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 ...
3
votes
1answer
27 views

Detemine “which device a file is in” in chroot environment?

According to this: Determine what device a directory is located on I can find which device a file is in by df command in a normal environment: fpemud-workstation / # df /bin Filesystem ...
2
votes
2answers
175 views

Set up enviroment for cross-compilation to i386, armel, armhf, arm64 and mips with no libglib2 conflicts

I'm trying to set up a build environment for a software in Debian Jessie. I need to produce amd64, i386 and eventually armel and armhf binaries of the software. It would be cool if I could ...
1
vote
1answer
43 views

create user with only permissions to execute C Programs

I am trying to build online code editor. My scenario : Through the web server a request is received for a 'C' program -the root user creates the file, compiles the file and acks success to the user. ...
1
vote
1answer
13 views

Using chroot to restore Kubuntu 14.04

I have accidentaly purged some system files and now Kubuntu 14.04 won't boot past the start up logo. I read online that I can perform changes on my system through my LiveUSB and the BASH chroot ...
-3
votes
1answer
21 views

How to make user but without access to public_html

How to make an user for linux, who can't access public_html folder? UPDATE: Indeed I want to use http://example.com/~user/ but user doesn't has any permission on other rootdir. How can I do it?
1
vote
0answers
21 views

American Fuzzy Lop run test program as unprivileged user or in chroot

I'm attempting to test tcsh on OS X with American Fuzzy Lop as an exercise, but don't want to accidentally clobber any useful files on my system. Knowing essentially nothing about fuzz testing, I did ...
5
votes
2answers
3k 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
13 views

How to use systemd-nspawn with pptp?

I would like to set a container use the vpn for only network interface. I have used the pptpsetup and pon make a pptp connection works, and got a ppp0 interface. Now, I want all internet connection ...
4
votes
1answer
1k 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
169 views

chroot cannot find cgi file

I am unable to serve or execute a cgi file, and the cause seems to be that chroot is unable to find the cgi file when the permission is set to executable. $>ls -l /var/www/my/dir/test.cgi ...
18
votes
1answer
13k 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 ...
1
vote
1answer
1k 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 ...
21
votes
5answers
157k 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 ...
1
vote
0answers
22 views

Why does copying /lib into a chroot jail not work? [closed]

I am working on a chroot jail that runs dropbear on an embedded system. I have created the jail, and tested it works. The issue I'm having is with dropbear. (dropbear is running in the chroot ...
1
vote
0answers
342 views

Is there a “supported” way in RHEL/CentOS 7 to union-mount a directory tree on top of an NFS mount point?

I have an NFS share containing almost 500 chrooted (s)ftp user's home directories. This NFS share is mounted on several FTP servers forming a highly available FTP cluster. I would like to enable ...
-1
votes
0answers
31 views

how can I install centos 7 inside RHEL5

I am badly in need to install one software torch 7 in a GPU hardware node. This GPU node is running licensed RHEL5 version. Unfortunately torch 7 software doesn't support any RHEL version(I feel). It ...
2
votes
1answer
58 views

Unable to reach network from chroot

I have a complicated scenario, with most of the complicated parts working: SD card contains a Fedora 23 Raspberry Pi install on a LUKS/BTRFS filesystem. Fedora 23 x86-64 VM being used to manage the ...
1
vote
2answers
71 views

“SSH Virtual Kiosk”. Does “PermitEmptyPasswords yes” work? - How to make ssh user with empty password, so random users can use it?

How to make properly secure ssh account with empty password for running trusted binary? I'd like to make a kind of "virtual ssh Kiosk" for random users, while limiting "demo app" behind ssh ...
0
votes
3answers
2k 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 ...
0
votes
2answers
69 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 ...
4
votes
1answer
113 views

Separate 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 ...
3
votes
1answer
43 views

Can I use `internal-sftp` when using wrapper script with `ForceCommand` in sshd?

I use /etc/ssh/wrapper.sh script, like in tutorial, that filters which commands are allowed to be run via ssh and logs them. Currently when internal-sftp is required, I use /usr/lib/sftp-server. Is ...
10
votes
3answers
1k 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 ...
2
votes
1answer
43 views

Why does uname -m report differently in chroot and schroot environment?

I am running Ubuntu 14.04.2, 64 bit host system. Using debootstrap, I installed a minimal Ubuntu 14.04.2, 32 bit system in trusty32 directory. This is what my schroot configuration look like: ...
0
votes
0answers
29 views

KVM on Crouton chroot?

I've enabled Vt-x support in BIOS, and have been trying to get KVM on my chroot for a few days now. I lost my chroot last night (got it into an unbootable state) trying and had to build a new one. ...
0
votes
1answer
20 views

Unable to mount SD card at crouton startup

I am just starting out running Ubuntu trusty through crouton on my chromebook, and I am attempting at mounting my sd card at startup. I currently have a shell script which mounts the sd card when it ...
0
votes
1answer
55 views

Xming for Linux? (Aka run a display/x11 server inside a window)

With Xming I can run an X11 server inside a window and then run mate-session to get a very fast remote desktop inside a window. On Linux, I'm not entirely sure how to X11 forward mate-session to just ...
20
votes
6answers
21k 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 ...
0
votes
0answers
20 views

How to configure vsftpd to use /opt/etc/passwd to authenticate

I have FTP setup on Solaris 8 and I am trying to migrate it to RHEL7. Present Architecture on Solaris FTP daemon is chrooted under /opt. When users try to login to FTP, they are authenticated with ...
0
votes
0answers
15 views

chroot into a Linux with X window system installed, from a Linux without X window system, and then run xinit, there is no mouse and keyboard working

I have two systems on my machine. One is Ubuntu and the other one is Linux from scratch (LFS) which I built it my self. Ubuntu has X window system installed but LFS has no windowing system ...
39
votes
4answers
14k views

chroot “jail” - what is it and how do I use it?

I have heard/read a lot about the chroot jail under linux but have never yet used it (I use Fedora day-to-day), so what is a chroot "jail"? When and why might I use it/not use it and is there anything ...
2
votes
1answer
89 views

How to write in home user with chrooted sftp

I have a problem with chroot sftp an their home folder. I would like to write in user's home but I don't have proper permission for doing that. sshd_config Match User demo ChrootDirectory %h ...
3
votes
1answer
62 views

Why is chroot(2) unavailable to unprivileged users?

Why is chroot(2) unavailable to unprivileged users? I don't understand existing answers on the Internet. For example this one ...
0
votes
1answer
69 views

avahi-daemon fails to start with “Failed to chroot(): Permission denied”. But only without stderr-IO-redirection

After a recent upgrate, avahi-daemon is not starting up anymore. Furthermore, the behaviour differes weather if I redirect stderr to a file or not. If I start avahi-daemon --debug with debugging ...
0
votes
0answers
24 views

Installing specific version of python and its dependencies in chroot enviroment

I'm trying to install python from source on chroot environment in CentOS 7.1, If I'm using ./configure --prefix=/chroot but I need to find the dependencies and copy them to chroot directory also, How ...
0
votes
1answer
19 views

Assigning output to variable in automated chroot script

For the life of me, I cannot figure out how to chroot through a script, and assign a value to a variable. Okay, so I learned how to chroot and execute commands from a script without halting the flow ...
1
vote
0answers
47 views

Python installation fails in chroot

I tried to install Miniconda Python in a chroot: chroot $1 wget -q https://repo.continuum.io/miniconda/Miniconda3-3.19.0-Linux-x86_64.sh -O /tmp/miniconda.sh ...
2
votes
1answer
1k views

Any better alternative to chroot on an OpenVZ VPS?

Are there any better alternative to chroot environment? I'm thinking about running nginx on a jailed environment. BTW, I'm on OpenVZ VPS, so modifying the Kernel is a no-no. (I think that prevents ...
0
votes
0answers
19 views

SFTP doesn't allow browsing for users (only root allowed) [duplicate]

I am trying to create the user which will have restrictions to get out of his home directory. Everything works fine with the "root" user, but other users have the problem. They're in "sftpusers" group ...
2
votes
1answer
33 views

Running maintenance commands in pbuilder chroot using cron

We run an automated build system using pbuilder-dist. We use it to build our open source project Snap Websites to produce nightly builds. Currently we are building against Ubuntu "trusty." The issue ...
1
vote
1answer
72 views

sbuild schroot fails

I am trying to package an Ubuntu package as a Debian package. For maintainability I am trying to use sbuild. Following the steps here I go through the first five steps, but when I try to build I get ...
0
votes
0answers
100 views

Directory does not exist inside the chroot

I'm trying to setup an ubuntu scope project using the setup wizard from the ubuntu sdk ide. The last step in this wizard is to run cmake, but I get the following error: E: Failed to change to ...
0
votes
0answers
56 views

file permissions is getting differed with the umask value while using sftp

I have set up the jail rooted sftp environment on port 222 with umask 0002. I have created the jail rooted user whose home directory is on nfs mount point. When I have tried to upload the files , I ...
1
vote
0answers
36 views

How to 'snapshot' a chroot?

I want to perform something similar to a 'clone' on vmware fusion/virtualbox/a VM manager. Host and chroot are both ubuntu. One complicating factor may be that this chroot may have one or more child ...
0
votes
0answers
13 views

Change permissions of /opt folder [duplicate]

Maybe this is dumb from the security point of view. But I would like to change permissions of /opt folder to 775 (or 777). Enabling the user to modify its content. Is this ok or does that pose a ...
2
votes
2answers
1k 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 ...
3
votes
1answer
40 views

How to detect the architecture of the chroot from inside the chroot?

Let's say for example the host system is running Debian amd64. And on that system, another Debian i386 has been installed inside a folder using debootstrap. Then assume a shell script is running ...
0
votes
1answer
36 views

How to run command after entering postgres

I am trying to execute ls after opening a new Guake tab and logging into postgres. guake -n guake -e 'sudo -i -u postgres && ls' The command successful opens a new tab then prompts me for ...