The file mode for a file on AIX returned by the Ruby stat method has 6 digits: ruby -e 'puts File::stat(testfile_upload-003).mode.to_s(8)'100644FWIW, Ruby version is ruby 2.1.6p336 (2015-04-13 revision 50298) [powerpc-aix6.1.0.0], butPerl returns the very same value: perl -e 'use File::stat; printf %o\n, stat(testfile_upload-003)->mode;'100644Here is the output of istat for the same file. # /bin/istat testfile_upload-003Inode 33780 on device 10/7      FileProtection: rw-r--r--Owner: 0(root)          Group: 0(system)Link count:   2         Length 51200 bytesLast updated:   Thu Mar  9 01:13:24 CST 2017Last modified:  Wed Mar  8 11:52:52 CST 2017Last accessed:  Wed Mar  8 11:52:52 CST 2017EDIT: the chmod man page andistat man page do not provide info for the 5th and 6th digits. And there is no fancy setuid bits set for that file:# ls -l testfile_upload-003-rw-r--r--    2 root     system        51200 Mar 08 11:52 testfile_upload-003
How to decode 6 digits file mode on AIX?
aix;stat