I did useradd -s /bin/rbash -d /var/www/html/directory USRNAME
and on ssh login with USRNAME (including ssh key), it goes to directory
and cd doesnt go back. So that works... but
if they use nano /var/www/html/.env
(before directory) it will say
Unable to create directory /var/www/html/directory/.local/share/nano/: Permission denied
It is required for saving/loading search history or cursor positions.
Press Enter to continue
If they press enter
it will allow them to read any file with nano.. anywhere in the system!
Any help to only allow this user to that specific directory only using google cloud?