in reply to Creating a directory.

  1. 0770 = 770 octal
  2. 770 = 770 decimal (weird bits)
  3. "0770" = 770 decimal
  4. "770" = 770 decimal
  5. "1770" = 1770 decimal (different weird bits)
  6. 1770 = 1770 decimal
And as someone else already said, yes, the bits of the umask are cleared from this value. Either change your umask, or try a chmod afterward.

-- Randal L. Schwartz, Perl hacker