I came across a piece of code where chmod permissions are getting mapped to an integer.33204 // -rw-rw-r--36863 // -rwsrwsrwt36855 // -rwsrwSrwt36799 // -rwSrwsrwt36351 // -rwsrwsrwx36343 // -rwsrwSrwxHow are these permissions mapped to an integer number? I am trying to find what permissions these numbers 33261, 41453 map to?I looked at various links, but I could find one that converts permissions into a number. Can someone help me with the conversion? Thanks in advance!
How to map chmod access permissions to an integer
permissions;chmod
They only make sense in octal. Here's the first line using one of my programs to convert:$ hex 3320433204: 33204 0100664 0x81b4 text \201\264 utf8 \350\206\264The 0100664 means it's a regular file with read/write (user), read/write (group) and read-only (other).  The chmod manual pages should mention this, but the first bit (the S_IFREG value) is not mentioned — even by POSIX — as often as the other flags.  Here's an example from a header:#define S_IFMT  00170000#define S_IFSOCK 0140000#define S_IFLNK  0120000#define S_IFREG  0100000#define S_IFBLK  0060000#define S_IFDIR  0040000#define S_IFCHR  0020000#define S_IFIFO  0010000#define S_ISUID  0004000#define S_ISGID  0002000#define S_ISVTX  0001000Further reading:understanding and decoding the file mode value from stat function output