ar stores permissions as octal numbers, output stream does write them correctly, input stream was reading them as decimal