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
7 views

Command not found: pdebuild fails, fakeroot succeeds

I'm updating a debian package and I need to call an external build dependency which is actually a toolchain. It doesn't have a deb package so I can't provide Build-Depends. I've chosen to include it ...
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 ...
2
votes
1answer
365 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 ...
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 ...
11
votes
4answers
13k views

How to unmount a formerly chroot'd filesystem?

I'm using a rescue-live-system (similar to a live-cd) to fix some issues with my Debian server, like that: # mkdir -p /mnt/rescue # mount /dev/md2 /mnt/rescue # mount --bind /dev /mnt/rescue/dev/ # ...
0
votes
0answers
26 views

CentOS SFTP chroot

I've some issues chrooting an SFTP access for a client. I can access the directory, but the problem is I can't read / write, I can just access the directory. Below is what I've done : # cat /etc/...
0
votes
0answers
28 views

how to restrict users to the assigned folder with SFTP

I know there is different version of this question. What I have is a Red Hat 7.1 Linux box in the cloud. What I need is: create a group exchangefiles restrict group to SFTP I have more than one ...
2
votes
1answer
34 views

How to ''jail'' a java program via chroot? (Fedora 23)

I recently created a MineCraft server in Fedora 23, and faced with problem "What if bad guys want to find really important files in my computer? I have to protect my files!" My jar is in /home/ ...
2
votes
0answers
52 views

Passwordless SSH access not working with rejected message

I setup SSH passwordless access between two Linux hosts. But passwordless access is not working. Authentication is cancelled with a rejected message as shown below su - wsync -bash-4.1$ ssh node-...
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
946 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 ...
0
votes
1answer
11 views

Can I VNC directly into my “Linux Deploy” from OS X?

I use Linux Deploy to run desktop Linux distributions on my Android devices. The way it works is the I start the system in the LD app, and then I go to VNC Viewer on the same device to get a GUI. ...
1
vote
3answers
50 views

Chroot into a different architecture?

I have a filesystem image that's going to be used for an ARM processor, but I want to install some things on it first, like a Desktop, etc. So I want to mount the filesystem on my Linux machine and ...
0
votes
1answer
111 views

crouton - ERROR: unknown command: shell [closed]

I'm using ASUS Chromebook Flip with Google Chrome OS 53.0.2773.3.dev and I'm trying Usage step from Chromium OS Universal Chroot Environment: (Ctrl+Alt+T, type shell and hit enter) I pressed ...
3
votes
0answers
48 views

SSH with chroot and only working “sftp”, “rsync” (both)?

I have two users and one shared folder in my Ubuntu server: User writer, which has write access to /var/shared. It's an application regularly making file changes in this folder from remote, with SSH ...
0
votes
1answer
28 views

How to sandbox code in chroot for multiple users?

What am I trying to do? I'm writing a code evaluator using chroot and python and went to hackerrank for some inspiration. What I think is happening at Hackerrank? Hackerrank creates run-...
0
votes
0answers
23 views

Cannot `arch-chroot` to an exising system, “failed to run command '/bin/sh' : No such file or directory”

I run into my system problem with the current Arch Linux, and it turns out to be caused by the F2FS file system (crc32 module not found during boot). I was attempts to fix it, but I've got stuck when ...
0
votes
1answer
486 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. ...
5
votes
3answers
6k views

chroot permission denied! But I'm root!

I am trying to chroot into an old HD to change a forgotten password, but chroot says permission denied? what gives? I am root! The harddrive I am trying to chroot into is an old version of edUbuntu 7....
1
vote
0answers
22 views

setting up sftp users only second instances of sshd

I created second instances of sshd called sshd-sftponly and using different port (e.g 2222 ) and made all necessary changes in /etc/rc.d/init.d/sshd-sftponly and /etc/ssh/sshd_config-sftponly ...
-3
votes
1answer
29 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?
3
votes
1answer
34 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 1K-...
2
votes
2answers
217 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 cross-...
1
vote
1answer
48 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
18 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 ...
1
vote
0answers
28 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
27 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 ...
1
vote
1answer
184 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 -rwxr-xr-...
18
votes
1answer
14k 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 ...
22
votes
5answers
171k 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
26 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
366 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 ...
2
votes
1answer
75 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
92 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 "pseudo-...
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
118 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
80 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
79 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
49 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
37 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
94 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 ...
22
votes
6answers
23k 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 archarm-...
0
votes
0answers
29 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
22 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 whatsoever....
42
votes
4answers
17k 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
99 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
68 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 https://lists.freebsd.org/pipermail/freebsd-security/2003-April/000123....