My Oracle Support Banner

How to Create a Chroot Jail Directory and Configure Users to Use it. (Doc ID 2411858.1)

Last updated on OCTOBER 07, 2020

Applies to:

Linux OS - Version Oracle Linux 5.0 and later
Oracle Cloud Infrastructure - Version N/A and later
Linux x86
Linux x86-64


The goal of this document is to provide a step by step guide on not only how to create and configure your chroot jail directory but also guide you on how to set up your users to use said jail directory.

It also explains a common solution to the below errors that can occur:

Error when trying to ssh with your jailed user:

# ssh user@server
user@server's password:
Write failed: Broken pipe

/var/log/secure displaying below error:

Jun 15 12:00:00 server sshd[6504]: fatal: bad ownership or modes for chroot directory component "/your_directory/"


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.