fix file permissions for runtime