When using fileowner() and posix_getpwuid() to get the owner of a file, getpwuid fails on No Such File Or Directory. Yet, when I use the same file path with other file functions, it works perfectly fine. fileowner() either returns 0 or 1058 for the uid.