File permission display and change in GCC
I want to display the file permission access to the user and then change the permision to read for all the other groups and user except the owner,using stat structure in gcc.
I have been able to display by
fileinfo.st_mode & 0777
but i want to display like this way:
-rwx-r--r--
but not sure how to do that .
And also want to set the permission as described earlier.
NE HELP!
|