chmod 777To apply chmod 777 recursively to a folder and all its contents, you can use the -Rchmod(string $filename , int $permissions ): bool Attempts to change the mode of the specified file to that given in permissions.