Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 have a linux server which users connect to with SSH. my users only upload and download content from their /home folder.

Basicly, I want them to be limited to see and use only their home folder.

I read that it might not be a good idea to do so, since they nead read premissions to run programs and scripts, but again: they are only downloading\uploading content to their home dir.

How can I do it?

share|improve this question

Follow this guide to configure your SSH server to chroot your users.

Essentially, use the ChrootDirectory and ForceCommand rules for sshd_config to limit certain users or groups (Match Group or Match User) to SFTP and a specific directory.

This requires use of the rule Subsystem sftp internal-sftp as well, unless the ChrootDirectory contains all files for a real chroot environment (like a /dev directory with some basic devices)

A different possibility would be to disable shell login. SCP and SFTP might still work for them.

share|improve this answer

You could also install webmin on the server with webmin you will be able to set limits as to what the users can do and access. Its pretty easy as well.

share|improve this answer

I'm not really good at bash, but Google led me to a link regarding restricted bash for user accounts. Hope It helps.

share|improve this answer
Welcome to Super User! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – slhck May 24 '13 at 7:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .