Ticket #23168 (closed defect: worksforme)
couchdb user created with wrong home directory
| Reported by: | jabronson@… | Owned by: | jwa@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.2 |
| Keywords: | Cc: | febeling@… | |
| Port: | couchdb |
Description
currently installing the couchdb port creates a "couchdb" user without specifying the home directory, so it gets set to /dev/null, resulting in the following:
$ sudo -H -u couchdb /opt/local/bin/couchdb =ERROR REPORT==== 6-Jan-2010::16:14:48 === file:path_eval([".","/dev/null"],".erlang"): not a directory ...
The couchdb user's home directory should be set to /opt/local/var/lib/couchdb. After I ran dscl . change /Users/couchdb NFSHomeDirectory /dev/null /opt/local/var/lib/couchdb, the error went away.
The following patch ought to fix this, as well as set the shell to something valid while we're at it:
Index: Portfile
===================================================================
--- Portfile (revision 62405)
+++ Portfile (working copy)
@@ -41,7 +41,7 @@
post-destroot {
addgroup ${dbgroup}
- adduser ${dbuser} gid=[existsgroup ${dbgroup}]
+ adduser ${dbuser} gid=[existsgroup ${dbgroup}] home=${dbdir} shell=/bin/bash
xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
${destroot}${dbdir} \
${destroot}${logdir} \
Change History
comment:1 Changed 3 years ago by macsforever2000@…
- Owner changed from macports-tickets@… to jwa@…
- Cc febeling@… added
- Port set to couchdb
comment:2 Changed 22 months ago by bfulgham@…
I don't see this problem under a recent Erlang and couchdb build.
Are you still experiencing this problem, or can we close this out?
comment:3 Changed 22 months ago by jabronson@…
Sorry, can't test at the moment. Feel free to close if you can't either.
comment:4 Changed 21 months ago by jmr@…
- Status changed from new to closed
- Resolution set to worksforme
Closing as per comment:2. Note that base is now using /var/empty as the default home dir for new users. You don't want to set a shell in any case, as this is not a user that you want someone to be able to log into the machine as.

