Trusting user input in PHP’s chmod: decimal vs. octal

The PHP manual on chmod has a subtle little warning about providing a decimal number instead of an octal when calling the chmod function: Mode is not automatically assumed to be an octal value, so to ensure the expected operation, you need to prefix mode with a zero (0). So what does this warning really […]