title: Why doesn't fopen open existing file? (returns NULL, errno ENOENT)
body: <p><strong>I have posted this to document my issue, see my self-answer below.</strong></p>
  
  <p>No matter what I try, <code>fopen(...)</code> cannot open the <em>existing</em> file at the path which exists and returns <code>NULL</code>. <strong><em>I am executing the program from a bash script in <code>~/path</code>. The program file is stored at <code>~/path/to</code>.</em></strong></p>
  
  <pre><code>int main(void) {
    const char* filename = "my/file"
    FILE* fp = NULL;
    fp = fopen(filename, "r"); // file is still NULL, segfaults on indirection
    if (!fp) exit(1);
    fclose(fp);
  }
  </code></pre>