chmod 777chmod(string $filename , int $permissions ): bool Attempts to change the mode of the specified file to that given in permissions.To apply chmod 777 to all the files and subfolders within the folder, you can use the find command in combination with the chmod command.