User SSH into folder but can nano into any upper folder?

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…