A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children.
Questions tagged [chroot]
413 questions
3
votes
1 answer
Resource consumption of FreeBSD's jails
Just for curiosity. An example machine: an dedicated amd64 server with the last stable version of FreeBSD and UFS for the partitions.
How much resources consume FreeBSD for each empty jail? I mean, I don't want know what is the resource consumption…

Rufo El Magufo
- 321
- 2
- 12
3
votes
3 answers
Defining hard links in puppet
Is there a way to define hardlinks inside puppet manifest?
It seems file type can only define symbolic links, but I need it to be hard links in order to make some of my chrooted applications to work. For example, I need to hardlink
/etc/hosts ->…

rvs
- 4,125
- 1
- 27
- 31
3
votes
3 answers
chrooting php-fpm with nginx
I'm setting up a new server with PHP 5.3.9 and nginx, so I compiled PHP with the php-fpm SAPI options. By itself it works great using the following server entry in nginx:
server {
listen 80;
server_name domain.com www.domain.com;
root…

dragonmantank
- 493
- 3
- 12
- 19
3
votes
2 answers
How to create a link outside of the jail, but accessable within the jail?
I have created a chroot jail, but now I want to be able to create a link within the jail which links outside of the jail. Is this possible?

samwell
- 339
- 1
- 6
- 13
3
votes
2 answers
Implications that come with chrooting php-fpm
I am creating a production server that will run nginx with php-fpm. I want to have a good mix between securing the server, and still having good quick workflow.
Now one thing that always secures the system is chrooting. Now I have read a lot about…

Saif Bechan
- 10,960
- 10
- 42
- 63
3
votes
2 answers
Setup secure shared hosting (Apache, PHP, MySQL)
So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely.
The plan is:
Chroot for MySQL (built in support for…

Apaz
- 43
- 4
3
votes
1 answer
Jail User to /var/www/username Directory via SSH
I have multiple folders in /var/www for different websites -- Apache uses name-based Virtual Hosts (Ubuntu Server). Suppose I want to allow someone to access their /var/www/user directory, but not cd out of it and be able to traverse the system.
I…

Trent Scott
- 959
- 1
- 12
- 28
3
votes
1 answer
Jailkit not allowing SSH connections
I'm trying to set up jailkit on one of my servers which is running Debian 5. I created a new ssh user (bob) and a chroot directory for him (/var/www/bob). I gave the chroot the extshellplusnet and limitedshell options with the following…

dragonmantank
- 493
- 3
- 12
- 19
3
votes
1 answer
Increasing permissiveness/permissions for umask + openssh + chrooted SFTP server using internal-sftp
The suggestion found at these links works for me:
How to setup ssh's umask for all type of connections
http://ubuntuforums.org/showthread.php?t=1107974#5
Summary: Use PAM to inject the umask, using the following line in /etc/pam.d/sshd
session …

JDS
- 2,598
- 4
- 30
- 49
3
votes
1 answer
jailkit chroot terminates ssh login
I've done my very best to follow these instructions to create a chroot shell. But the connection get's terminated every time I try to login via ssh for my new chrooted user.
I start my ssh terminal, login via chrooteduser and then as soon as I'm…

Emmanuel
- 347
- 1
- 9
- 20
3
votes
1 answer
SSH Fails, /bin/bash: No such file or directory
I have a user who is jailed.
sshd_config:
Subsystem sftp internal-sftp
Match user matt
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
passwd:
matt:x:1001:5006:Matt Ryan,,,:/home/matt:/home/matt/bin/bash
This works…

Matt Ryan
- 175
- 1
- 2
- 9
3
votes
3 answers
How to chroot Apache on CentOS?
I have been advised by a sysadmin, to run Apache in a chroot jail, in order to prevent that an attacker could take control of server.
So my question is:
What is the best method to chroot Apache/2.2.3 in RHEL/CentOS 5?, i only use the default…

Jonathan Meyer
- 133
- 1
- 5
3
votes
2 answers
Setup PHP/MYSQL for chrooted jail (jailkit)
I'm running Ubuntu, with PHP5-FPM, mysql & Nginx
I've just setup a chrooted jail with jailkit. Now I need to work out how to setup my php and mysql to work within the jail.
Google search doesn't give me much, and there's no documentation for this on…

Emmanuel
- 347
- 1
- 9
- 20
3
votes
2 answers
Is it possible to mount a subdirectory as the root file system at kernel startup?
I'm trying to install a linux from sources inside my home directory(as oposed to creating a dedicated partition). The basic system(glibc, kernel and init) is installed at $HOME/lfs/root. I'm booting this system using grub installed inside my usb…

Thiago Padilha
- 299
- 1
- 5
- 10
3
votes
2 answers
Is it advisable to run Apache in a chroot jail?
I have been advised by a sysadmin guy I know, to run Apache in a chroot jail, for increased security.
I have the following questions:
Is this advisable (i.e. are there any 'gotcha's that I need to be aware of) ?
Does running Apache in a chroot jail…

user35402
- 1,171
- 3
- 10
- 18