On my shell, I have a file and I change the permissions of this file with sudo chmod 4755 <file>
. Upon calling lstat
on this file, I'm seeing correct information about its permissions, specifically that it has 4755 as its permission mode.
In my golang program, is there a reason why I'm not getting the correct permission mode bits? Could it be that I'm just formatting the result I get from FileInfo().Mode().Perm() incorrectly? Could it be that the upper 3 bits are "special"?
Thanks for the help!