PHP-chmod()

The chmod() file system function in PHP changes the file or folder permissions on a target file path. This function takes two parameters, first the target path and the second is the mode you wish to change the permissions to.

Here is the example: