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
2answers
1k views

What is the right way to chroot perl script?

I created /opt/chroot, create bin lib and other directories in it, copied libraries, bash and perl binaries in proper places. Also I placed my script into /opt/chroot/bin/. Now I can run the script ...
2
votes
1answer
6k views

bad ownership or modes for chroot directory component

I created the user MY_USER. Set his home dir to /var/www/RESTRICTED_DIR, which is the path he should be restricted to. Then I edited sshd_config and set: Match user MY_USER ChrootDirectory ...
2
votes
2answers
2k views

User can't SFTP after chroot

Ubuntu 10.04.4 LTS I'm trying to chroot the user 'sam'. According to all the articles out there this should work, but apparently I'm still doing something wrong. The user: ...
2
votes
2answers
576 views

How to map authenticated Nginx users to their own directory?

I am writing a social networking site in C and serving it all up with Nginx. How can I make it so that authenticated users go to their own directory -ONLY- where a user-specific index.html resides. ...
2
votes
3answers
625 views

bind9 in a chroot jail - necessary or not?

I always used to keep my bind9 installation in a chroot jail. Now I upgraded my vServer and have to install bind9 over again. Due to the virtualization solution my hosting provider uses, I cannot ...
2
votes
1answer
743 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 ...
2
votes
2answers
955 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 ...
2
votes
2answers
1k views

Is MySecureShell a good way to manage SFTP user with chroot on a Centos Server?

I need to setup my Centos 5.4 server for SFTP with chrooted access only (or equivalent). The regular solution using RSSH find here : ...
2
votes
1answer
1k views

How to set chroot for SFTP under Ubuntu 8.04?

Ubuntu 8.04 LTS comes with OpenSSH 4.7, before the ChrootDirectory parameter was introduced. How can I upgrade OpenSSH to 4.9+? Alternatively, without upgrading OpenSSH, how can I set chroot?
2
votes
1answer
325 views

VSFTPD how chroot not chrooted users in /home?

I need to chroot all local users to their home directories, but one user should have access to all user directories. If I put admin_user in chroot_list_file he has access for whole file system. I want ...
2
votes
1answer
252 views

build user chroot on first login

I'm using ldap for remote user authentication and I basically need to either figure out how to: a. chroot a user on machine b from machine a via nfs,(which doesn't seem possible without mounting ...
2
votes
2answers
475 views

SFTP post upload hook

How would I run a script after a file has been successfully uploaded over (a chrooted) SFTP? I have this working on standard FTP connection using PureFTP ...
2
votes
2answers
551 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
1answer
2k views

Running BIND9 In chroot

I am trying to running bind9, on a ubuntu box, in a chroot jail, as discussed in "Linux System Administration" (Adelstein & Lubanovic). The command "sudo /etc/init.d/bind9 start" is generating ...
2
votes
2answers
1k views

nginx+php-fpm(chroot). No input file specifed

OS: Centos PHP: 5.5.6 Nginx: 1.4.4 Nginx conf server { listen 80; server_name example.ltd; root /srv/example.ltd/www; index index.php; access_log /srv/example.ltd/logs/nginx-main.log main; ...
2
votes
2answers
628 views

How to setup a public rsync and sftp server

I want to setup a public storage server which allows sftp and rsync (through ssh). I've got it working with a chroot jail and rssh. When the user connects to the server with sftp he can read all the ...
2
votes
1answer
3k views

ubuntu bind9 AppArmor read permission denied (chroot jail)

I am trying to run bind9 with chroot jail. I followed the steps mentioned at : http://www.howtoforge.com/debian_bind9_master_slave_system I am getting the following errors in my syslog: Jul 27 ...
2
votes
1answer
959 views

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: ...
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' ...
2
votes
1answer
649 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, ...
2
votes
1answer
380 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 ...
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 ...
2
votes
1answer
1k views

Is there an available repository to update OpenSSH to 4.8+ on Centos 5.4?

I need OpenSSH 4.8+ in order to do setup a clean chrooted SFTP on my Centos 5.4 with Remi and EPEL repositories. Is there a repository for Centos which contain an updated OpenSSH? Thanks! Extra ...
2
votes
2answers
239 views

can not run java inside grsec chroot

java runs well inside common chroot. however in a grsec hardened chroot it complains it has no enough memory to build VM. any ideas of how to make it run cause i really need a hardened chroot. ...
2
votes
2answers
779 views

Setting up a chroot sftp on debian server

I'm trying to allow a user "user" to access my server by either sftp or ssh. I want to jail them into a directory with chroot. I read the instructions here however it does not work. I did the ...
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?
1
vote
1answer
171 views

chroot user to var/www/html

Can I limit a user login through sftp only can see and change files under var/www/html folder? I tried below, but then I can't login in Transmit through sftp # adduser user_www # passwd user_www # ...
1
vote
2answers
826 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 ...
1
vote
3answers
3k views

SFTP to chroot and SSH to manage system in one config?

We have a webserver where users are allowed to upload (SFTP) large files in a chroot environment. We also want to be able to use SSH to manage this server. In our old situation we used the system ...
1
vote
1answer
2k views

Is it possible to allow key based authentication for sshd_cofnig chroot sftp users?

I'm running an Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-30-generic x86_64) Server, with OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012. I'd like to configure chroot for sftp access using ...
1
vote
4answers
910 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
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 ...
1
vote
1answer
199 views

Chroot with SSH connections doesn't work

I have found How can I chroot ssh connections? and a lot of different blog articles and similar (http://undeadly.org/cgi?action=article&sid=20080220110039, ...
1
vote
2answers
2k views

Chrooted SFTP user - Write permission denied even for owner

On CentOS release 6.5 (Final) I created a restricted user test1 useradd -s /bin/false test1 and configured ssd_config as following Subsystem sftp internal-sftp Match User test1 ...
1
vote
2answers
6k views

chrooting user causes “connection closed” message when using sftp

First off I am a linux newbie so please don't assume much knowledge. I am using CentOS 5.8 (final) and using OpenSSH version 5.8p1. I have made a user playwithbits and I am attempting to chroot them ...
1
vote
1answer
709 views

setlocale error with chroot

I have created a chroot jail and when I log in I get a bash warning bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) I tried to google the error, but wasn't able to find a ...
1
vote
2answers
305 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
1answer
879 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 ...
1
vote
2answers
2k views

scponly worked but didn't chroot the home folder, the user can still browse the entire server

So I followed the "Chroot and Debian" tutorial in http://sublimation.org/scponly/wiki/index.php/FAQ Then when I log into user "upload" via ssh I have no access to the command line (this is what I ...
1
vote
3answers
6k views

RHEL 5.4 & Chrooted SFTP

According to release notes, RHEL 5.4 included an update to setup chrooted SFTP accounts natively. But from what I am seeing, it is all or nothing--This means that even root is chrooted if you go this ...
1
vote
1answer
164 views

How can I find out the path to a chrooted environment in which a particular daemon was started?

I have a setup with several directories where I can chroot and start the same daemon from. I'd like to be able to tell from which of my multiple directories I started the daemon. I'd like to find it ...
1
vote
2answers
952 views

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 ...
1
vote
1answer
223 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
2answers
325 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 ...
1
vote
1answer
308 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 ...
1
vote
3answers
924 views

Is there an equivalent to MySecureShell for Centos?

I have some issue to install MySecureShell on CentOS 5.4 because I want to use Yum to install it (for maintainability). I get this error : yum install mysecureshell Error: Missing Dependency: ...
1
vote
1answer
483 views

Chrooting a ftp user to a particular directory

I would like to chroot a user to their home directory on a debian linux server. Im using vsftpd server. I've done it with a user before, and now cant remember how to do it. I've limited ssh access to ...
1
vote
2answers
44 views

“No input file specified” when running php under fastcgi inside chroot under nginx outside of chroot

I have a scenario with nginx/1.4.6 running on Ubuntu 14.04 but with php/5.2.10 inside a chroot Ubuntu 9.10 (Karmic Koala). My issue is that all requests to php files result in the dreaded "No input ...
1
vote
1answer
58 views

How to run “apt-get” in chroot from systemrescuecd?

I boot with systemrescuecd 4.3.1, and run like below. $ mkdir /tmp/os $ mount /dev/sda1 /tmp/os $ mount -o bind /sys /tmp/os/sys $ mount -o bind /dev /tmp/os/dev $ mount -o bind /proc /tmp/os/proc $ ...
1
vote
1answer
87 views

chroot 64 bit -> 32 bit = 'command not found'

Very obviously 32 bit cannot chroot to 64 bit but I am confident that I have successfully chrooted from 64 bit to 32 bit using Gentoo but when I [root@localhost ~]# mount /dev/vg_atom1/lv_root ...