I want to let some of my friends access my computer by making them user accounts. They will mostly access my computer by sftp and ssh, but they could also sometimes access it at my home. However I don't want them to be able to see all my file (not my personal files from my home directory, I mean files that reside outside of the user directory, like etc, lib...)
I asked the question recently:
OpenSSH, chroot user: Root needs to own the user directory, is there any consequence?
And the awnser that was given to me was that if I chroot the user, I will need to create a complete environment for every user.
Is there a way to actually prevent users from going outside of their home directory and preventing them from an passing argument to a program like cp
that would point outside of their home directory, or any way to actually keep my system private? What is the best solution? I want them to be able to fully use all my programs, but unable to copy or read files, or use programs to read or copy file outside of their home directory.
internal-sftp
option withChrootDirectory
insshd_config
. You'll also want to consider setting up quotas if you share the same partition with the other users so they can't fill up your free drive space. – jw013 Apr 22 '12 at 02:45