Here is what I followed on Ubuntu, must work on Debian too. At least check the chown ans chmod section:
# via http://wiki.apache.org/couchdb/Installing_on_Ubuntu sudo apt-get install --yes build-essential curl git sudo apt-get install --yes python-software-properties python g++ make sudo apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets sudo apt-get install -y libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool # via http://ftp.fau.de/apache/couchdb/source/1.6.1/ cd /tmp wget http://ftp.fau.de/apache/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz tar xvzf apache-couchdb-* cd apache-couchdb-* ./configure && make sudo make install useradd -d /var/lib/couchdb couchdb chown -R couchdb: /var/lib/couchdb /var/log/couchdb # vi /etc/passwd here and change home directory to /usr/local/var/lib/couchdb/ chown -R couchdb: /usr/local/var/{lib,log,run}/couchdb /usr/local/etc/couchdb chmod 0770 /usr/local/var/{lib,log,run}/couchdb/ chmod 664 /usr/local/etc/couchdb/*.ini chmod 775 /usr/local/etc/couchdb/*.d cd /etc/init.d ln -s /usr/local/etc/init.d/couchdb couchdb /etc/init.d/couchdb start update-rc.d couchdb defaults curl http://127.0.0.1:5984/ # vi /usr/local/etc/couchdb/default.ini # change bind_adress to 0.0.0.0 service couchdb restart -- Regards, Kiril Stankov, OpenNet Software ltd. -------- Original Message -------- From: "Dr. Johannes Zellner" <[email protected]> Sent: 21 January 2015 00:01:59 EET To: [email protected] Subject: can't run couchdb run as couchdb user / only root works Hi, I installed couchdb 1.6.1 on *debian 8.0, armv7l* mostly according to https://cwiki.apache.org/confluence/display/COUCHDB/Debian http://docs.couchdb.org/en/1.6.1/install/unix.html *unfortunately it runs only as root, not as couchdb user although **I followed the instructions for ownership and permissions*, especially: |sudo mkdir -p /usr/local/{lib,etc}/couchdb /usr/local/var/{lib,log,run}/couchdb | |sudo chown -R couchdb:couchdb /usr/local/{lib,etc}/couchdb /usr/local/var/{lib,log,run}/couchdb| |sudo chmod -R g+rw /usr/local/{lib,etc}/couchdb /usr/local/var/{lib,log,run}/couchdb| --> *all couchdb directories and their content under /usr/local are owned by couchdb.couchdb*. When starting couchdb as couchdb user I get: couchdb@localhost:~$ couchdb Apache CouchDB 1.6.1 (LogLevel=info) is starting. Failure to start Mochiweb: eacces [error] [<0.101.0>] {error_report,<0.30.0>, {<0.101.0>,crash_report, [[{initial_call, {mochiweb_socket_server,init,['Argument__1']}}, {pid,<0.101.0>}, {registered_name,[]}, {error_info, {exit,eacces, [{gen_server,init_it,6, [{file,"gen_server.erl"},{line,322}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}}, {ancestors, [couch_secondary_services,couch_server_sup,<0.31.0>]}, {messages,[]}, {links,[<0.90.0>]}, {dictionary,[]}, {trap_exit,true}, {status,running}, {heap_size,987}, {stack_size,27}, {reductions,455}], []]}} {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,couch_secondary_services,{shutdown,{failed_to_start_child,httpd,eacces}}}}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,272}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}} Crash dump was written to: erl_crash.dump init terminating in do_boot () *Any ideas what's going wrong?* -- Johannes
