-
getuid to decode uid ?
I need to find out the owner of a file, i can get this as an int using st_uid of the stat struct, this int isnt greatly useful though, how do i get the 'real' user id. Is it the function getuid(), if so how di i actually use this function.
i tried passing it the value from the struct
getuid(statStruct.st-uid)
but this doesnt work. Any info appreciated!
tia
-
sorry, didint make myself clear, i want to return the user name of the file owner.
Eg, my code for getting the st_uid from the struct stat returned 6749, how do i get the username (eg i-baughe) from that value