0

I have a main_user that also has a root access to the node. Following question is related to permissions for users who are connected via ssh.

I would like to constrain a user to only have permissions for his/her home folder in linux and in addition to that without having ssh login access.

[Q] How can I configure such a user?

My approach: Is this approach a recommended way to do it? Still guest user has read permission to all directories under root ('/') directory such as /var /bin /tmp /sys /bin /dev /mnt etc. I am not sure is there any users' important files under those directories.

main_user@server$ chmod go-rwx /home/* #I disabled read access of guest user into all users' home directories under /home.
main_user@server$ sudo useradd -d /var/lib/guest -m guest -s /bin/bash
main_user@server$ sudo su - guest # I switch into guest user.
guest@server$ # Here guest user has no write permission to other folders.
alper
  • 200

0 Answers0