I'm going to permit redirections ">>" and ">" for the www-data user in sudoers but I can't find this.
There is a conceptual problem here.
If you allow www-data to have access to a shell that allows redirection (for example
bash), that user is allowed to do redirection.
However, the user must have write permission on the directory or file where the redirection goes to (write on directory if you want to create new files).