When adding new users to my server, I want them to have their own /home/ dir, and also /home/user/www/ which is linked from their own apache html folder. No other user should be able to view those files.

At the same time I dont want to restrict them from the basic trusted user shell commands. This is how it is today, but, the question: how do I manage this, without giving access to config / os files? I dont like users being able to read the diverse files lying around.

Should I add a group for those users which restricts specific dirs and files? Or change permission for those files? Are there any other way? I have been looking at chrootjail, but it restricts too much functionality. How do host providers solve this?

Best scenario would be to have them see home as root.

  • 1
    Use userdir techytalk.info/… – Panther Sep 4 '18 at 2:02
  • That solves the personal web dir, but not restrict anyone looking at e.g: / or /var/.. – inf Sep 4 '18 at 16:50
  • There is no easy way to manage system files beyond the default setup. If you need that look at LXC or docker – Panther Sep 4 '18 at 18:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.