Empty ~./Xauthority; quota woes

I ran into an interesting situation today: a user was able to login to a system, but no X11 connections could come through. Any time an X11 connection was attempted, he got this error message:

X11 connection rejected because of wrong authentication

Long story short, the problem was that his quota was completed maxed out. The ~/.Xauthority file was created, but it was a zero byte file and could not store the requisite credentials. Once the quota issue was fixed, everything came back to normal.

Beware of open file handles

The next part of the investigation for this particular user was that the quota was still showing as being maxed out even after he had deleted some large files. In running du the entire home directory showed up as having no more than 400MB, yet the quota was still maxed out at 1GB.

Even though the file was deleted and not showing up in that part of the directory structure, there was a persistent process that still had a file handle open. As a result, it didn’t show up in any ls or du commands, yet it was only when these processes were killed that the quota came back to normal and everything worked smoothly again.

WordPress + nginx: don’t forget your $args

I’ve been using nginx with WordPress for a while now, though I somehow missed an important aspect of using the try_files directive. Namely, it is important to include ?$args in the following pattern:

location /wp {try_files $uri $uri/ /wp/index.php?$args;}

Without ?$args, GET variables are not passed to WordPress unless it is based off the root URL. As a result, pagination in a search query fails, the Sharedaddy plugin does not work, and anything else that uses that access pattern will also encounter serious trouble.