The disk on a Ubuntu server filled up causing a website to fail and some database corruption. After freeing some space (rogue wordpress backup plugin) and reimporting the database we found some functions of the site where not working.
I fixed some of the problems by changing the PHP upload_tmp_dir do be something other than /tmp. I still had issues but then I changed the mysql tmpdir to be something other than /tmp
/tmp was owned by root, had 777 permissions and I was able to write to it at the command line. I've not yet removed and recreated the directory as I want to understand the problem.
What could be causing the problems with applications writing to /tmp? How can I diagnose and get to the root of this issue?