Apache is running as user www-data. The following line has to added to sudoers:
%www-data ALL=NOPASSWD: /sbin/tc