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)'
100644
FWIW, Ruby version is ruby 2.1.6p336 (2015-04-13 revision 50298) [powerpc-aix6.1.0.0], but Perl returns the very same value:
perl -e 'use File::stat; printf "%o\n", stat("testfile_upload-003")->mode;'
100644
Here is the output of istat
for the same file.
# /bin/istat testfile_upload-003
Inode 33780 on device 10/7 File
Protection: rw-r--r--
Owner: 0(root) Group: 0(system)
Link count: 2 Length 51200 bytes
Last updated: Thu Mar 9 01:13:24 CST 2017
Last modified: Wed Mar 8 11:52:52 CST 2017
Last accessed: Wed Mar 8 11:52:52 CST 2017
EDIT: 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
chmod
orstat
– Chris Davies Mar 09 '17 at 08:29