Restrict a user to only have access to ONE single folder.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Restrict a user to only have access to ONE single folder.
Is there a SIMPLE and easy way to restrict a user to only access ONE single folder. I want to enable ssh login, but i dont want then to access more than one maybe two folders.
Permissions are assigned to the owner of the file (or folder), the assigned group, and "all others". So you can create a file (folder) which is only accessible by a specific user, or a specific group. If you use the user method, then the user (as owner) will be able to change certain things. By using groups, you can have tighter control.
To simply restrict one or more users to be able to read files in specific folders, simply assign a group to those folders (and contents) and then add the user(s) to that group.
To be more specific, post an example of a scenario:
How many users?
Should they have read, write, or execute privileges?
I think he means something like chrooting a user to a specific branch in th e directory tree so they can't access anything on the filesystem but what's in their current and sub directories.
I've always wondered if that was possible myself. The closest thing I've been able to find is a restricted shell that only lets you perform a reduced set of internal commands like ls, cd, etc.
I think he means something like chrooting a user to a specific branch in th e directory tree so they can't access anything on the filesystem but what's in their current and sub directories.
I've always wondered if that was possible myself. The closest thing I've been able to find is a restricted shell that only lets you perform a reduced set of internal commands like ls, cd, etc.
Thats exactly what i meant! i want some users just to have read/write access in their own home folder.... they shouldnt even be able to read anything else. But i dont have a clue how. Is there an easy way to do this ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.