problems in getting file permissions using stat
Protection st_mode is of type mode_t in the stat structure. When I'm using %d to print this , I'm not getting the correct permissions...
But when I use %o to print this,,,I'm getting the right perms but a '10' in extra..
say,,,the mode is 0777 ...when I print this using %o,,,I'm getting 100777..
Why is it so?
|