How to grant permissions to the apk on React Native?

I have integrated my react native app with appium. I have installed the appium and appium doctor library and was able to run the appium server on my linux machine. On running the node index.js, I get the following error

ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: The application at ‘/tmp/.mount_AppiumuMkBb3/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk’ is not writeable. Please grant write permissions to this file or to its parent folder ‘/tmp/.mount_AppiumuMkBb3/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks’ for the Appium process, so it could sign the application.

It has something to do with granting permissions.I have been debugging this since a long time and have had no luck. Can anyone please guide me on granting permissions on react native?