I am trying to jail user. I have got these directories:
var/www (root:www-data, 755) var/www/web1 (webmaster:www-data, 755) var/www/web2 (webmaster:www-data, 755)
In my ssh_config I have got:
Subsystem sftp internal-sftp Match User webmaster ChrootDirectory /var/www ForceCommand internal-sftp
The user can enter the system with the credentials. Also, the user can navigate to var/www, but he cannot access web1 or web2. I don't know why because "webmaster" is the owner of web1 and web2.
Thank you very much. I think that the permissions have been set correctly but I am not an expert in Linux.