finding user permissions
i am trying to find out how to find out how to check if a file has root user privileges, if it does then the user should receive an error.
i have so far found the stat() function where it could retrieve the uid but currently have no idea about how to implement it
because it just returns a 0 or a -1 what would this mean? -1 root??
help on this would be much appreciated
stat() returns a struct containing a lot of info.
Look at the appropriate field in the struct.
i see where your coming from ive done a little bit more reading
but im failing to find a good example of the use of stat()
i would preferably like to see the uid_t example