How to give access to the files of node for individual users? In my website I have these modules enabled: File Entity (fieldable files), Media, Rules, Entity reference.

The default download method is: Private local files served by Drupal.

So when userA upload file to node. userB can't see it.

Q: How to give access to view file by entityreference(user) for userB?



UPD:

I create subdomain http://filesaccess.onenglar.com/ 

So you can login:

user: root

pass: root



UPD2:

Sharing access i think by entity reference field (user)

But how share access to the files of node for individual users?))
To do the access checking yourself you'll need to write a hook_file_download(). 

In broad strokes you'll need to get the actual file object (see this question for help with that), find the references with file_get_file_references(), and finally load them to check each reference (probably just one but it would be unwise to assume that's true) to see if the current user is given access to the file.