One difference to remember between files and directories is that the execute bit for directories simply allows 'passing through' the given directory. So with the following settings you can pass through X and A but not B, but in no case actually list the files.
Code:
sudo mkdir -p /tmp/X/A/Y/
sudo mkdir -p /tmp/X/B/Z/
sudo chmod 701 /tmp/X/
sudo chmod 701 /tmp/X/A/
sudo chmod 700 /tmp/X/B/
sudo chown peter7089 /tmp/X/A/Y
sudo chown peter7089 /tmp/X/B/Z
ls /tmp/X/A/Y/
ls /tmp/X/B/Z/
ls /tmp/X/A/
ls /tmp/X/B/
ls /tmp/X/
chmod 700 /tmp/X/A/Y/
chmod 700 /tmp/X/B/Z/
sudo chmod 700 /tmp/X/B/Z/