Found the following PHP code today:
mkdir($directory, 02777); chmod($directory, 02777);
I understand the PHP, but not first part of those numbers. The 777 part is clear, and if I have understood correctly the 0 just means it's octal. But what does the 2 in there do?
Also, if I changed it to 02640, would the 2 still do whatever it does, or does it change according to what comes after it?