Permissions problems under Ubuntu
---------------------------------
Key: COUCHDB-302
URL: https://issues.apache.org/jira/browse/COUCHDB-302
Project: CouchDB
Issue Type: Bug
Affects Versions: 0.9
Environment: r757147
Ubuntu Hardy
Reporter: Brian Candler
Couchdb install scripts not setting correct permissions under Ubuntu. First I
did a complete wipe of all couchdb-related files and directories:
$ sudo rm -rf /usr/local/var/lib/couchdb
$ sudo rm -rf /usr/local/lib/couchdb /usr/local/share/couchdb
/usr/local/var/log/couchdb /usr/local/var/run/couchdb.pid
/usr/local/etc/init.d/couchdb /usr/local/etc/logrotate.d/couchdb
/usr/local/etc/default/couchdb /usr/local/bin/couch{db,js}
Then after a 'make install':
$ sudo /usr/local/etc/init.d/couchdb start
* Starting database server couchdb
Apache CouchDB needs write permission on the PID file:
/usr/local/var/run/couchdb.pid
[fail]
So I created the pidfile by hand:
$ sudo touch /usr/local/var/run/couchdb.pid
$ sudo chown couchdb:couchdb /usr/local/var/run/couchdb.pid
$ sudo /usr/local/etc/init.d/couchdb start
* Starting database server couchdb
/usr/local/bin/couchdb: 1: 0: not found
/usr/local/bin/couchdb: 1: 0: not found
/usr/local/bin/couchdb: 1: 0: not found
[ OK ]
Despite the "not found" errors, couchdb was running. Now:
$ curl -X PUT http://localhost:5984/db1
{"error":"error","reason":"eacces"}
I found that /usr/local/var/lib/couchdb had been recreated with owner 0:0
It seems to work OK after this:
$ sudo chown couchdb:couchdb /usr/local/var/lib/couchdb
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.