#601462 change home directory of www-data to something other than /var/www

Package:
base-passwd
Source:
base-passwd
Description:
Debian base system master password and group files
Submitter:
"Thijs Kinkhorst"
Date:
2011-12-01 06:30:03 UTC
Severity:
wishlist
#601462#5
Date:
2010-10-26 13:57:09 UTC
From:
To:
Hi,

www-data has as its home directory /var/www:

  www-data:x:33:33:www-data:/var/www:/bin/sh

This seems about the least logical choice for this, as the www-data user
is meant to *not* own the web content. /var/www is the default location
for web content.

Better alternatives are probably /nonexistent (as for nobody) or
/var/lib/www-data if there would be some use for the user having an actual
homedir (which I'm not aware of).

(Whether it should have a shell is already discussed in #274229).


Cheers,
Thijs

#601462#10
Date:
2011-12-01 06:26:51 UTC
From:
To:
I can think of a use for a home directory for www-data outside of
webspace: a .netrc file. There is a Python module for reading them,
and they are useful for storing low-security authentication data, such
as the consumer key and secret of my test twitter app. That way my
script can read the key and secret from .netrc whether I am running
the script manually, or whether it is being run as a CGI script.