So that I don’t forget: Despite what the documentation says, being unclear (links always have an underscore over there, so it’s hard to tell difference between a linked underscore linked item, and one merely space-separated), you should grant ‘SHOW VIEW’, not ‘SHOW_VIEW’. Additionally, ‘SHOW VIEW’ really needs SELECT permissions as well.
Monthly Archives: February 2012
Remember this: find recursion
I keep forgetting. To limit find’s recursion, use:
find . -maxdepth X
Where X is the recursion number. Maxdepth must be before any search selection stuff (type, name, mtime, perm etc).
Deleting lots of tiny files really really quickly
This is the second half of that magento issue. Mainly, after having got a directory with millions of files in it, you can do one of two things.
mv sessions sessions_full && mkdir sessions && chown www-data:www-data sessions
rm -rfv sessions_full
Or
find /loc/of/sessions -ctime +1 -type f -exec rm -v {} \;
bind refuses to restart, debian squeeze
After an upgrade, I’ve noticed a few times that bind has refused to restart or reload, saying:
Stopping domain name service: namedrndc: connect failed: connection refused
This seems to be a permissions bug in debian, quite a long lasting one. In order to cheat-fix it quickly, I do the following:
chown bind:root /etc/bind/rndc.key
chmod 660
/etc/init.d/bind9 restart
That seems to fix it well enough. I think it’s a problem in that bind starts as one user, but runs as another. It may be that 440 are all the perms that are necessary. The debian bug report is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=169577
Magento Session Files
Magento (the popular open-source online shop system) likes to store its PHP session files in ~/public_html/var/session/
Most debian servers don’t have that in their cron job that deletes old session files.
So, you probably want to set it to store it’s session files in the default location (/var/lib/php5) or alter your cron job (/etc/cron.d/php5)
Fun!