I'm posing this question because I still haven't found a uniform method that I'm particularly fond of. Ideally, this combination of directory structure and permissions should suit any web server (don't assume Apache). I should also mention that I'm concerned only with *nix servers.

I'm primary looking for:

- Best combination of uid/gid/other (names and octets)
- Relatively secure (doesn't have to be uber paranoid)
- Easy to use / maintain (CMS's are able to self-update, no permission issues)


Just for reference, the current stack I'm working on is Ubuntu 11.04 + Nginx + php-fpm + Wordpress, although the ideal solution should work for any website