Check out example codes for "how to change file permissions in C language". It will help you in understanding the concepts better.

Code Example 1

SYNOPSIS
   #include <sys/stat.h>

   int chmod(const char *path, mode_t mode);

...

Learn ReactJs, React Native from akashmittal.com