PHP: chmod - Manual - PHP: Hypertext Preprocessor
BEWARE, a couple of the examples in the comments suggest doing something like this: chmod(file_or_dir_name, intval($mode, 8)); However, if $mode is an integer then intval( ) won't modify it. So, this code... $mode = 644; chmod('/tmp/test', intval($mode, 8...