1

I'm planning on hosting a server with a friend, and we both want to be able to have the server but not have access to each others files. Is it possible to lock a user into their own directory, denying any and all access to any folders/files outside of their home?

  • Only file access (SFTP) or also SSH? And if SSH, do you really need to lock them or you just want to lock away the other home directory? Check this https://askubuntu.com/questions/267019/how-can-i-prevent-users-accessing-anything-but-their-own-home-directory. But if your question is only about SFTP, then it's possible and fairly easy to achieve --> https://askubuntu.com/questions/49271/how-to-set-up-a-sftp-server-with-users-chrooted-in-their-home-directories – pLumo Jul 21 '21 at 06:03
  • You can use the Jail technique, which will limit the user to only the jail path. Using chroot https://help.ubuntu.com/community/BasicChroot – SaleemKhair Jul 21 '21 at 06:34

0 Answers0