Add java api fallback for file permissions