so I setup sftp and it all worked fine. but the user dir is /usr/ftp_user and instead I would like the dir to be /var/www and restrict it only to the files in that folder.
Match Group ftpaccess ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
user ftp_user is added to the ftpaccess group. I changed the home directory for the user to /var/www/ like:
usermod -d /var/www/ ftp_user
And the file permissions:
drwxr-x---. root root www drwxr-xr-x. ftp_user ftpaccess cronjobs
When I try to connect with filezilla
Status: connecting to 18.104.22.168... Status: Connected to 22.214.171.124 Status: Listing directory / error: Unable to open .: permission denied
Anyone knows what im doing wrong?