So I'm still getting the same error. Rather than search through all of the directories in the commands above, I just executed them as root from the command line, one at a time. Each ran cleanly--no errors. In addition,
root@math:/opt/webwork/webwork2# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),1002(wwdata)
indicates that the web server is a member of the wwdata group. The following process listing:
root@math:/opt/webwork/webwork2# ps aux | grep www-data
www-data 1446 0.0 0.2 98180 11240 ? S Aug11 0:00 /usr/bin/perl /usr/sbin/apt-cacher -R 3 -d -p /var/run/apt-cacher.pid
www-data 6444 0.0 1.3 233352 53584 ? S 09:25 0:00 /usr/sbin/apache2 -k start
www-data 10929 0.0 2.1 294668 86552 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 10930 0.0 2.1 292536 84536 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 10933 0.0 2.1 293180 85196 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 11335 0.0 1.3 233100 53060 ? S 14:03 0:00 /usr/sbin/apache2 -k start
root 11424 0.0 0.0 7628 1024 pts/2 S+ 14:07 0:00 grep --color=auto www-data
www-data 13367 0.0 2.1 292992 84904 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 13369 0.0 2.0 291920 83968 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 17033 0.0 2.1 293260 84972 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 17035 0.0 2.0 291448 83424 ? S Aug14 0:00 /usr/sbin/apache2 -k start
www-data 17265 0.0 1.3 233352 53612 ? S Aug14 0:00 /usr/sbin/apache2 -k start
shows that the web server is running as www-data. Is it possible the WW scripts are suid'ing to some other user? (Also, I've confirmed that the default "uploads" dir in global.conf is as you suggest, i.e. $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads";)
Albert