in reply to How do I check if another user can access a file?

In my experience, “the one and only way to know is to try it.”   Write your code so that, upon switching to the target user, it attempts to do various harmless things.   For example, try to create a dummy file and to delete it again.   Read the list of files to be sure that the files exist and that you can open them all (one at a time).   Then, if the bridge seems to be supporting your weight as it should, venture to cross it.