I was wondering how to setup user accounts on linux where the user cannot read or edit outside their home directory.
Generally you want to chroot them into their home directory. If you do a google search on something like "linux chroot home directory" You will pull up hundreds of howto's on the subject.
It's just not as easy as running a single command.
Valid question, +1 to remove negative vote. Mike's is the "proper way" to achieve what you seek.
The direct answer (and a PITA way of doing things) is to screw up your system's permissions. You might think that a massive chmod -R 750 * would do it, however then your users will not be able to run programs or read important initialization files in /etc.
What I would do to still grant people access to important info is chmod directories to 751 or 711, which is
It's not what I might call the true way (or correct answer), but this is what I would do as a user to share services with other users while still keeping some privacy.
Now that I've thought more about this, an actual scenario for this question might be the mildly paranoid virtual host granting occasional ssh access to users. I would try something like
Another real case for weird