Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to create an user inmy ubuntu server, but this user CANNOT read outside his /home/user how can i do?

share|improve this question

migrated from stackoverflow.com Sep 16 '11 at 20:00

This question came from our site for professional and enthusiast programmers.

closed as not constructive by Zoredache, Wesley, Scott Pack, Ward, Iain Sep 17 '11 at 16:16

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
We need more information. Why do you want to keep him in $HOME? Is this for ssh access? ftp? sftp? –  Alex Holst Sep 16 '11 at 20:12
    
yes exactly..... for ssh access –  user94956 Sep 16 '11 at 20:16
add comment

2 Answers

You can use a popular jailing script written in python. Check it at the address: http://lshell.ghantoos.org/

share|improve this answer
add comment

Essentially, you want chrooted accounts. Here is a howto:

http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny

More information can be found in the sshd_config's man page:

http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5

share|improve this answer
add comment