title: Can not create new file in the /proc filesystem from the user space in C. Is it even possible?
body: <p>So, here is the function that should create and write string into a /proc/minifwdb:</p>
  
  <pre><code>int write_to_file(char* rule)
  {
      FILE* fin;
  
      fin = fopen("/proc/minifwdb", "a");
  
      if (!fin)
      {
          printf("Could not open the file /proc/minifwdb, exiting...\n");
          return 1;
      }
  
      if (fprintf(fin, "%s\n", rule) &lt; 0)
          return 1;
  
      fclose(fin);
  
      return 0;
  }
  </code></pre>
  
  <p>When fopen() is called, it returns NULL. And there is no such file as /proc/minifwdb currently. Do I need to create it using LKM, and then use it to write the info? 
  I am also trying to create it from the user that has no root access. Any suggestions?</p>