mkdir 777 php code example Example: php mkdir with 777 permission $oldmask = umask(0); mkdir("test", 0777); umask($oldmask);