0

This question already has an answer here:

I want to set up an account purely for someone/thing to access via SFTP.

I have already setup the home directory as /media/HardDrive/FTP

Is there any way to prevent this user (Bob) from accessing /media/HardDrive?

Probably a really simple thing to do but I want to lock them out of /media/HardDrive.

I'm still getting to grips with the whole Linux operating system so a step-by-step instruction guide on how to do this would be really helpful as I'm not totally sure what I need to do.

marked as duplicate by gertvdijk, chronitis, Eric Carvalho, psusi, Kevin Bowen Oct 19 '13 at 22:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The keyword you're looking for is chroot. I'm sure such a Q&A already exists here. – gertvdijk Oct 14 '13 at 21:59
0

You will need to setup a root jail (commonly called a chroot) for the user logging in to your server. The SSH daemon (which handles incoming sftp traffic) has a ChrootDirectory property which can do this.

Though it is no detailed step by step guide, this other question on AskUbuntu may get you on your way. A step by step walkthrough is provided in this article.

Not the answer you're looking for? Browse other questions tagged or ask your own question.