I want to connect to /var/www via sftp, I made the chroot directory, but /www belongs to another user and group (nginx:nginx), so it can´t connect to it, how can I do it without changing the user neither the group?
For example if I configure chroot only like /var, it works because /var belongs to root:root note: I also changed the main directory of my users (usermod -d /var/www sftp_user)