On my system, field $8
is the hour/year, not the filename. Maybe that's the case for your root user as well. This is why you should never try to parse ls. Even if you fix this issue, half a dozen more will remain to break the system in the future.
Use find instead:
find /tmp ! -name '*zend*' ! -name '*textfile*' -user www-data \
-exec chown -R tm:tm {} \;