Check out example codes for "NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/var/www/html/index.html'". It will help you in understanding the concepts better.

Code Example 1

$ sudo chown -R <user-name> <directory-name>

Learn ReactJs, React Native from akashmittal.com