How do I make a user account using useradd and give the user access to only the dir where he can just read write files. The user when login goes to this base dir I provide and cannot access anything else on the system.Thanks
migrated from stackoverflow.com Jun 24 '11 at 16:20
This question came from our site for professional and enthusiast programmers.
|
A typical user already behaves almost in this fashion -- that is, if you create a user with You can't meaningfully prevent them from having read access in a number of places -- for example, the user needs read access to files and directories like You're much better off ensuring that data that shouldn't be visible to arbitrary users is protected by the appropriate permissions. | |||
|
feedback
|
|
Rather than setting up a chroot a simpler solution may be to use a restricted shell (such as rbash). See http://man.he.net/man1/rbash and http://blog.bodhizazen.net/linux/how-to-restrict-access-with-rbash/ . | |||
|
feedback
|