Lock users to only their directory

Ok, first off all I am wanting to lock users to the /home/USER dir so that way they cannot go up a level and view the /home or any other dir other than theirs.

How can I go about doing this?

Also, how can I disable SSH for users?


With FTP, you can lock users to a homedir by going into Limits and Validation -> FTP Directory Restrictions, and setting up a directory restriction from within there.

To disable SSH, you could go into System Customization -> Custom Shells, and make sure no user has /bin/bash as a shell – make sure it’s either /bin/false or /dev/null.

The catch with all this, is that a user still has filesystem permissions to see outside their directory.

Any web-based file manager they install would allow them to view files outside their homedir, so long as the Linux permissions allowed them to.

In general, though, the permissions only allow them to see things that they should be able to see, so that’s probably not a problem :slight_smile:


When I try to set this up, I can’t login with FTP or SSH. I need help with this!!

Well, you didn’t say what specifically you changed or what errors your receiving in the logs – however, a shell of /bin/false is required to be able to log in via FTP.

A shell of /dev/null would only allow users to log in for email access.


When I select that for my temp, I can’t login via ssh or ftp.

I’m lost on this :frowning:

Okay, just be as specific as possible and we can get all this figured out :slight_smile:

What specifically did you select?

And, if you look in the error logs, what error do you see?

Where the error log is depends on your distro – but it’d be either /var/log/secure or /var/log/auth.log. You might also want to take a peek in /var/log/messages.