Hello,
I am assuming that there are only 2 users for your problem. If that is so then you can do a recursive setfacl for userB and then make sure that your userA has a restrictive umask.
Of course, it would help to know if both users are in the same group but if they aren't you could do something like the following:
Set the folder readable by userB:
Code:
setfacl -m u:userB:rx /home/userA/Test
Set the contents of /home/userA/Test readable to userB:
Code:
setfacl -Rm u:userB:r /home/userA/Test/*
If the umask of userA is 077 you'll have what you were asking for, assuming that all my assumptions are correct because anything created by userA will only be readable by him.
To make this work you have to have acls enabled in the running kernel and make sure that the filesystem on which you want to do this is has the acl option set when mounting.
I hope this helps.
Good luck!