I'm building an sFTP solution but I can't stop group1user from seeing or more exactly listing group2user's directories. I've configured it so that group1user can't actually get into group2user's directories but they can actually see the directory name when they connect via FileZilla.
File structure =
/upload/group1Directory
/upload/group2Directory
dave is the owner and can see and enter both group1Directory and group2Directory
The current permissions look like this
rwxr-xr-x. 4 root root 46 Feb 17 09:55 upload
drwxr-x---. 2 dave group1 60 Feb 17 11:09 group1Directory
drwxr-x---. 2 dave group2 61 Feb 17 11:09 group2Directory
the sshd_config looks like this
Match User dave
ForceCommand internal-sftp -u 0002
#PasswordAuthentication yes
ChrootDirectory /upload
PermitTunnel no
AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
PubkeyAuthentication yes
Match User group1user
ForceCommand internal-sftp -u 0002
#PasswordAuthentication yes
ChrootDirectory /upload
PermitTunnel no
AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
PubkeyAuthentication yes
Match User group2user
ForceCommand internal-sftp -u 0002
#PasswordAuthentication yes
ChrootDirectory /upload
PermitTunnel no
AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
PubkeyAuthentication yes
Any ideas how I can hide group2user's directory from group1user?...and vice-versa? Any help very gratefully received