How to fix file permissions on Android 5 so that a certain app can access certain files?
Try using Supersu 2.49 beta for Lollipop (LP) 5.0.

Do a full unroot first.

I have LP 5.0 Touchwiz on my Samsung tab with SElinux enforcing and functioning root. The Supersu version in your recovery can probably be replaced by unpacking your recovery with any number of methods and/or tool-sets, and replacing the archive. The better approach would be to update your recovery if one is available. Also, fix permissions scripts need a different/new approach as of Android 5.0.

This is my imperfect fix permissions script for my other Samsung tab running LP 5.1.1:

#!/system/bin/sh
mount -o rw,remount /system
find -type d -exec chmod 755 {} \;
find -type d -name '.*' -exec chmod 755 {} \;
find -type f -name '.*' -exec chmod 644 {} \;
find -type f -name '.su' -exec chmod 755 {} \;
find -type f -exec chmod 755 {} \;
find -type f -name '*.h' -exec chmod 644 {} \;
find -type f -name '*.a' -exec chmod 644 {} \;
find -type f -name '*.o' -exec chmod 644 {} \;
find -type f -name '*.so' -exec chmod 644 {} \;
find -type f -name '*.so.*' -exec chmod 644 {} \;
find -type f -name '*.c' -exec chmod 644 {} \;
find -type f -name '*.cpp' -exec chmod 644 {} \;
find -type f -name '*.cgf' -exec chmod 644 {} \;
find -type f -name '*.xml' -exec chmod 644 {} \;