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
4
votes
1 answer
A proper way to create a chrooted SSH on CentOS 7
There are a lot of tutorials of how to create a chrooted SFTP, but I would like to use SSH, because it is much faster to simply wget, unzip, mysql and mysqldump than tossing around the FTP and phpMyAdmin. The method should be also clean (without the…

amq
- 733
- 2
- 6
- 9
4
votes
1 answer
Set Initial Remote Working Directory in SFTP
I am running Amazon Linux AMI (Red Hat derivative), and am creating a new SFTP server using OpenSSH. I would like for the SFTP user to be restricted to a directory, and to be able to write to the initial directory that is shown by their SFTP…

pgn674
- 61
- 1
- 1
- 3
4
votes
2 answers
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 files in the chroot jail (like /lib and /bin) in…

vdrmrt
- 101
- 1
- 5
4
votes
3 answers
set up a chrooted SFTP login with OpenSSH
How might I create an SFTP login for an untrusted user in which he can only access the files in his own home directory and not run any commands?
The online tutorial OpenSSH SFTP chroot() with ChrootDirectory is almost exactly what I need, except…

Sophie Alpert
- 1,639
- 1
- 13
- 16
4
votes
1 answer
Chrooted user does not start in his home directory and does not load his bash_profiles
If the users logs in, he starts in / of the chroot (Which is /var/jail on the real machine). I would like him to start in his home-dir. Also, he seems not to load any of his profile-files (.bash.rc etc). I followed this tutorial to create the chroot…

Stuffy
- 177
- 1
- 1
- 9
4
votes
5 answers
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:
sam:x:1005:1006::/home/sam:/bin/false
I changed /etc/ssh/sshd_config like…

Dauntless
- 189
- 1
- 2
- 7
4
votes
2 answers
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. I am not asking how to populate the index.html…

DisgruntledUser
- 101
- 2
- 9
4
votes
2 answers
update grub2 without hardware access (e.g. in a chroot)?
I'm writing a script that takes a master KVM image, converts it to VDI, makes a few changes to it,
and offers it up for download.
I need to update the kernel boot parameters for some of the newly created images. Normally one would
edit the…

wryfi
- 161
- 1
- 3
4
votes
1 answer
HAProxy running in chroot jail is only logging started messages
I've configured my HAProxy server to run in a chroot jail logging messages to syslog socket. My problem is that the only messsages currently being logged are for when haproxy is starting up.
May 26 10:42:37 dev haproxy[13986]: Proxy my_listener…

scarba05
- 333
- 6
- 15
4
votes
4 answers
Prevent rssh users from leaving their jail directories
I'm attempting to use rssh to jail users strictly to their /home/user/public_html dirctories.
I got it to work where an account can SFTP into the system successfully on a test server, but once I login as that account, I noticed that I can change…

Skittles
- 421
- 1
- 7
- 16
4
votes
2 answers
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 /srv/chroot/squeeze64
$ debootstrap --arch amd64 squeeze…

Andres Jaan Tack
- 197
- 1
- 2
- 9
4
votes
2 answers
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 directories that are outside the chroot'ed environment.…

Jake Wilson
- 8,814
- 29
- 97
- 125
4
votes
7 answers
Does using chroot for a publicly-exposed service provide any real security benefit?
I would like a definitive answer as to why this practice should be pursued with services that are exposed to potentially hostile network(s) (i.e. the Internet). As I understand it, there is a method for breaking out of a chroot jail, so if there is…

Avery Payne
- 14,536
- 1
- 51
- 88
4
votes
1 answer
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 the custom install process, I need the installer…

regularfry
- 215
- 2
- 11
4
votes
3 answers
Proftpd: How to set default root to a users home directory without jailing the user?
I've installed proftpd on my debian box but I'm having having some trouble with the configuration.
In my proftpd.conf I've added;
DefaultRoot ~ !ftp_special
This works fine in that all users except members of ftp-special are unable to navigate…

John
- 201
- 1
- 3
- 10