Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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 http://www.webmin.com/ 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
1  
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

Your Answer

 
discard

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.