How can i restrict a user to their own home directory? [ROOT]

Hi, I am fairly new to linux administration and I’ve seen some of the posts on how to force users to their own home directory, I’ve tried several and got locked out of my own server… I decided it’d be better to make a new post.

Some goals:

  1. I use root to do every other thing (SSH and SFTP mostly)
  2. I’m trying to chroot users to their own directory eg: user test should be restricted to viewing only in home/test/ and cannot view out of it.
  3. SSH access & SFTP access should be allowed for the user test

A Huge thank you in advance.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer