Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed dropbear on a embedded linux system, and I launch it by a

dropbear -r rsa_host_key

Everything works as expected, except that all users are able to "climb" outside of their home directory, until reaching /. Argh!

I remember having seen this phenomenon on a ftp server, but I haven't been able to find out the solution again.

What is the solution to keep them inside their home directory ?

share|improve this question
up vote 1 down vote accepted

It's not much of a "phenomenon", it's the way things work normally. The way Linux and most other operating systems are designed, there is no problem in being able to access the entire file system: there are only few files with private data, and those are restricted by default. The rest - well, I can't see much harm in being able to browse /lib or /usr... Besides, you cannot run any programs if you are denied access to those locations.

(As for other users' files - again, can be locked with a chmod.)

In some FTP servers, you have the option to enable chroot, which essentialy changes the / to represent the user's home directory. It's possible to do this with SFTP as well, although I'm not sure if Dropbear allows that (OpenSSH does). But when it comes to restricting interactive shell access to $HOME, it's... Well, I've seen it done on OpenBSD, but it caused a whole lot of problems.

share|improve this answer

You can use chroot with dropbear:

share|improve this answer
This is the usual mechanism for restricting access to the home directory. Otherwise the noticed file system visibility is normal to Linux/Unix systems. – Fiasco Labs Dec 24 '11 at 20:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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