Give Access to user only on his home and /var/log/ directory
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Give Access to user only on his home and /var/log/ directory
Hi All,
I have one local account created in my syslog server. My requirement is to allow user to login to system and access only his home directory and /var/log/syslog-ng/ directory. Except that he should not browse any other directories. Please suggest how this can be achieved.
Why not use jail?
You need to provide more information:
1. What access do you want the user to have, really? You mention browse, are you talking sftp, ftp, http, or other access?
2. Does this user get a shell? (there are some nice sftp-only setups that jail a user without a true chroot jail)
3. Why the restriction re: not using ACL or jail? If we do not understand your restrictions, suggestions we make may not be appropriate.
My first approximate, lacking better information about your objective, would be to assume sftp only and point you at the recent ssh pages about how to accomplish this using the ssh conf files only. Then add the bind mount option to make that log folder appear to be RO mounted under the users home.
Use a restricted shell (like with sftp). If you still want to use normal SSH access, then I would still opt for using file ACLs (as it is unclear why you prefer not to use it).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.