chmod g+rw controlfolder1/control1
chgrp -R controlgroup1 controlfolder1/control1
gpasswd -a control1 controlgroup1
Next I ran this
chown root:root /usr/local/controlfolder1
chmod 700 /usr/local/controlfolder1
chown -R control1:controlgroup1 /usr/local/controlfolder1/control1
I went into /etc/sshd_config and toward the end of the file I added this
Code: Select all
Match Group controlgroup1
# Force the connection to use SFTP and chroot to the required directory.
# Disable tunneling, authentication agent, TCP and X11 forwarding.
I restarted ssh. Then when I login the user is free to traverse around any folder in the whole system with no restriction at all. So can I ensure when he log in only view this folder and in addition how to give ssh access also to this folder too.