wikimedia/limn — pull request #74 by ottomata (2013-02-18 20:03:33+00:00)
Title: var directory should be configurable.

Perhaps instead of setting LIMN_DATA, we should set LIMN_VARDIR.

I'm attempting to launch a limn instance as a new 'limn' user. The working path base directory of my limn instance is /root/deb/build/limn, which is owned and writeable only by root. When I start server.co:

```
$ server/server.co
Failed at: server/server.co
Error: EACCES, permission denied '/root/deb/build/limn/var/.cache/browserify'
at Object.fs.mkdirSync (fs.js:483:18)
at Function.sync (/root/deb/build/limn/node_modules/mkdirp/index.js:55:12)
at module.exports (/root/deb/build/limn/node_modules/browserify/node_modules/deputy/index.js:10:12)
at EventEmitter.Wrap (/root/deb/build/limn/node_modules/browserify/lib/wrap.js:28:30)
at module.exports (/root/deb/build/limn/node_modules/browserify/lib/wrap.js:14:12)
at module.exports (/root/deb/build/limn/node_modules/browserify/index.js:49:13)
at HTTPServer. (/root/deb/build/limn/server/middleware.co:150:16)
at HTTPServer.app.configure (/root/deb/build/limn/node_modules/express/lib/http.js:542:61)
at HTTPServer.limn.application.init (/root/deb/build/limn/server/middleware.co:143:10)
at limn (/root/deb/build/limn/server/middleware.co:91:7)
```

When we productionize and install this via the .deb, limn will install into /usr/lib/limn, and shouldn't write any file in that directory.

I think it'd be acceptable to remove the LIMN_DATA variable and instead use LIMN_VARDIR. Limn data would then be relative to LIMN_VARDIR, at LIMN_VARDIR/data. This .cache directory (and any other files that Limn needs to write) would be subdirs of LIMN_VARDIR.