#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *path, struct stat *buf);
These functions return information about a file. No permissions are
required on the file itself, but--in the case of stat() and lstat() --
execute (search) permission is required on all of the directories in
path that lead to the file.