A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children.

learn more… | top users | synonyms

2
votes
4answers
3k views

Unmounting root filesystem without rebooting the server

I have a server that I can access through SSH. There is no KVM available and there's only one root partition for the whole server. I have deleted some files that I shouldn't have and want to recover ...
1
vote
2answers
319 views

Secure PHP environments with PHP-FPM and SFTP

I'd like to set up secure environments for a small number of untrusted PHP websites on a Debian server. Right now everything runs on the same Apache2 with mod_php5 and vsftpd for administrative file ...
4
votes
2answers
1k views

schroot fails to mount on entry

I'm trying to setup a chroot environment for myself, and it is failing. This has been reproduced on multiple versions (10.04 and 11.04) of Ubuntu. I set it up by doing: $ mkdir -p ...
0
votes
1answer
1k views

Share multiple directories to ftp users

I have multiple directories spread over the file systems of multiple Ubuntu 10.04 servers. The requirements are to allow a handful of people access a few of these directories over ftp. For example ...
0
votes
1answer
129 views

Jail CentOS group to single dir (and dir's within) - FTP

What I am ultimately looking to do is jail a group of users to only be able to FTP into their home folder. They should be able to have r&w capabilities within their home folder, and within ALL ...
3
votes
1answer
1k views

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, ...
4
votes
3answers
4k views

Trying to setup chroot'd rsync

I'm trying to set up a backup server. I want to chroot each user (client) to its home directory, and only allow it to use sftp and rsync. I quickly discovered that I was not the only one trying to do ...
1
vote
4answers
905 views

Restrict users to their home directory

How do I restrict the user to his current directory only? I tried the steps mentioned on this page to configure rssh chroot jail to lock users to their home directories only, but this looks too ...
1
vote
2answers
799 views

When is it not worth putting Apache in a chroot jail?

I don't mean to question the well established security precaution of putting apache in a chroot-jail in most scenarios but in my scenario I have doubts. We have a virtual server hosting a single ...
0
votes
1answer
350 views

How to create virtual users in vsftpd?

I am running vsftpd on my Debian squeeze server. I configured it to chroot local users into their /home/ directory. Now, the problem is that users' web pages are outside of their /home/ directories ...
2
votes
1answer
728 views

Debian: ip/network changes within chroot/jail

I've Debian Squeeze running and setup a chroot environment (/jail) with debootstrap. As seen in a tutorial, I mounted the following: proc on /jail/proc type proc (rw) devpts on /jail/dev/pts type ...
1
vote
1answer
217 views

Security implications of mount --bind in a chroot environment

Assume you have a chroot environment where you need a resource - an application or a library - which resides on the host (external to the chroot). Which are the security implications (if any) of ...
1
vote
1answer
399 views

Is there an equivalent of ToLower for a vsftpd.conf?

I am running a vsFTP server using virtual users. I chroot each user to their own personal subdirectory. For ease of use I would like to make my usernames case-insensitive, but I am having some ...
3
votes
3answers
6k views

Why is “chroot” never used on Mac OS X?

I've been using Macs for 25 years, and "UNIX" since OS X 10.0.. but I've never really thought much about chroot, nor have I ever really needed or wanted to... It's a simple question, but... under ...
2
votes
2answers
228 views

Security of chroot and linux binaries

I'd like to verify the security of chroot and default programs in a linux distribution (say Ubuntu). Example: I set up jail directory 'A'. Every linux binary from the distribution is placed in 'A' ...
0
votes
1answer
504 views

How to get PHP mysql_ extension for linux chroot jail?

I've setup a chroot jail using jailkit on my Ubuntu 10.04 system. I've copied the binaries for php and mysql which all worked fine. So from the command line of my chrooted user I can run php ...
1
vote
2answers
3k views

OpenSSH 5.3 setting UMASK for SFTP chroot env, dosen't work at all

I tried to override umask setting on SFTP connection in chrooted env. I couldnt use subsytem diffrente than internal-ftp. In OpenSSH_5.3p1 (Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009) there's umask ...
1
vote
3answers
1k views

sftp chrooted dosent work with some sftp client (Cyberduck)

I'm not able working on SFTP+chrooted env Using internal-sftp directive it works, but i'm not able to set umask. (ex umask 002) Using sftp-server from openssh package dosent't work because login shell ...
2
votes
1answer
637 views

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, ...
0
votes
1answer
6k views

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 ...
0
votes
1answer
126 views

How can I setup a one-way scp?

I am trying to setup a remote host to act as a data sink, i.e. some kind of environment on the remote host, A, which allows users to scp data from their local machine to A but not from A to their ...
3
votes
3answers
3k views

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 ...
2
votes
1answer
378 views

Updating (and configuring) chroots on general purpose CentOS webserver with yum?

I'm currently providing web hosting on a shared web hosting VPS environment - that has no chroot. This is obviously a big security concern, although I've made sure that only the owners of files can ...
1
vote
2answers
4k views

Pure-FTPD chroot not working on a fresh Debian install?

I am trying to get chroot to work with virtual Pure-FTPD users, but for some reason it simply is not working. I changed the following options: /etc/default/pure-ftpd-common: VIRTUALCHROOT=true ...
0
votes
1answer
285 views

Multiple chroots in ubuntu for PHP/MySQL hosting

We have a server, Core i7, 24GB RAM we run some of our own applications on. I want to offer some clients PHP/MySQL hosting on that server. Is it feaseable and possible to create a chroot for each ...
0
votes
1answer
445 views

File permissions to run mysqld in chroot

I'm trying to run mysqld inside chroot environment. Herez the situation. When I run mysqld as root, I can connect to my databases. But when I run mysql using init.d scripts, mysql gives me an error. ...
2
votes
3answers
3k views

Webserver: chrooted PHP gives mysql.sock error when attempting to reach mysql

Hey guys, I've configured an Ubuntu webserver with Nginx + PHP5-FPM. I've created a chrooted environment (using jailkit) that I'm tossing my developers into, from where they can develop their test ...
1
vote
2answers
1k views

vsftpd chroot_local_user does nothing

I'm setting up a vsftpd server on: Linux 2.6.32-26-server #48-Ubuntu SMP Wed Nov 24 10:28:32 UTC 2010 x86_64 GNU/Linux When I set chroot_local_user=YES, there is no effect (I can still see / when I ...
2
votes
2answers
1k views

Chroot for Mysql running on Ubuntu 10.10?

Prompted from a question about MySQL server security best practices, I've been running through this list (with a few minor alterations) to properly secure my server database server: ...
1
vote
2answers
323 views

sendmail not working

I'm trying to use the mail() function in PHP on a Debain Linux server. I have 2 web servers running. One is in a chrooted setup. The server that's not chrooted works fine, the other one wont send ...
2
votes
2answers
3k views

Access files outside a chroot'ed environment?

I need to setup some users to access our server. I thought the most secure way to allow them access was to setup a chroot'ed jail for them to log into. But I need them to access a few select ...
0
votes
2answers
3k views

How to allow passwd in chroot?

I have a multi-user server, which puts a subset of the users in a chroot. I want to allow all users to call passwd in order to change their respective password. Everything else I can think of is ...
0
votes
1answer
732 views

OpenSSH, ChrootDirectory, WinSCP. How do I allow wget and tar?

I think my question is really: How do I follow the ChrootDirectory directions here to allow interactive shell? I have a virtual server at Linode running Ubuntu 10.04. I will be hosting a Drupal site ...
1
vote
1answer
622 views

Is it possible to run dhcpd3 as non-root user in a chroot jail?

I would like to run dhcpd3 from a chroot jail on Debian Lenny. At the moment, I can run it as root from my jail. Now I want to do this as non-root user (as "-u blah -t /path/to/jail" Bind option). ...
2
votes
2answers
540 views

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 ...
2
votes
2answers
6k views

How do I unmount a bound /proc in a “dead” chroot?

I built a debootstrap chroot and bound /proc to it, i.e. sudo mount -o bind /proc <chroot>/proc When I found I no longer needed it, I quite stupidly rm -r <chroot>'d it. Of course, rm ...
3
votes
0answers
523 views

Can socat be used to forward an ssh-agent socket into a chroot?

I'm building custom Debian environments on a remote server, which I connect to over SSH. This involves building a debootstrap environment, then chrooting into it to run a custom installer. As part of ...
0
votes
3answers
272 views

FTP server configuration

Hi I am configuring VsFTPd 2.2.2 server on Debian 5.0. I want user after login can see and edit just two dirs: /home/user/ /var/www/project1/ /var/www/project2/ Possible solutions I can Chroot ...
1
vote
3answers
868 views

Help on chroot sftp user

I have 5 sites all under /home/mainuser. I have created user in /home/user1, currently the sftp works and the user is jailed to his folder. However, I want it to have access to 2 sites in ...
2
votes
2answers
70 views

Jail on a http only server

Does it make sense to set up a chroot jail for a apache server which is the only service on the server? Or it is pointless, because the server is in either way lost if it get hacked?
10
votes
2answers
28k views

chroot fails - cannot run command `/bin/bash': No such file or directory

I'm a chroot novice trying to make a simple chroot jail but am banging my head against the same problem time and time again... Any help would be massively appreciated I've created a directory ...
11
votes
3answers
7k views

Is there a windows equivalent to chroot?

On a *nix system I can use a chroot to isolate 2 processes from each other and from the rest of the system. Is there any similar security system under windows? Or is there any way to prevent 2 ...
2
votes
2answers
313 views

Apache Error Log - “Web Path” instead of Filesystem Path

I'm running Apache on Linux and I'm using OpenSSH to provide SFTP access to some customers so they can upload their pages and also look at their respective site logs (access & error). I'm using ...
2
votes
1answer
938 views

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 ...
1
vote
2answers
302 views

CHROOT for shell script testing

I am looking at setting up a shell script in order to properly document and automate the process I am using to setup a few servers we have. In order to test the shell script through its different ...
1
vote
2answers
266 views

How can I install ubuntu server in a chroot environment?

I am using Ubuntu Karmic desktop. I want to install Ubuntu 8.04 LTS server in a chroot environment. Can anyone provide instructions on how to do this?. A Google search does not bring up anything ...
1
vote
1answer
292 views

question about chroot

I used chroot to install Debian Lenny on my Ubuntu desktop. I have now decided I will no longer be using Debian and so I want to remove Debian and install Ubuntu server in a chroot instead. My ...
2
votes
2answers
822 views

Is Chrooting apache/mysql/php a standard practice of securing web servers containing sensitive data?

Is Chrooting apache/mysql/php a standard practice of securing web servers containing sensitive data (is it necessary)?
1
vote
1answer
875 views

chroot'ing SSH home directories, shell problem

I am trying to chroot my SSH users to their home directories and it seems to work.. in a strange way. Here is what I have in my sshd_config: Match group restricthome ChrootDirectory %h The ...
4
votes
2answers
1k views

What is the secure way to isolate ftp server users on unix?

I've read documentation for various ftp daemons and various long threads about the security implications of using a chroot environment for an ftp server when giving users write access. If you read the ...