Failed to open 'foo.in': fopen: Permission denied