I am using SFTP with active directory. After authenticating users I am redirecting all users to one directory that is upload2
. But now I want redirect some users to one directory and some users to another directory using ChrootDirectory directive. As per my knowledge in ChrootDirectory we can use only %h
and %u
parameters. Can we put condition in ChrootDirectory directive or more parameters?
AllowGroups *
UsePAM yes
Subsystem sftp internal-sftp
Match Group sftp-users
ChrootDirectory /upload2
AllowTcpForwarding no