3

I installed couchDB under Sabayon with help of Rigo and followed this instruction ( http://guide.couchdb.org/draft/source.html ):

xyz@wp01 ~ $ su
Password: 
wp01 xyz # chown -R couchdb:couchdb /etc/couchdb
wp01 xyz # chown -R couchdb:couchdb /var/lib/couchdb
wp01 xyz # chown -R couchdb:couchdb /var/log/couchdb
wp01 xyz # chown -R couchdb:couchdb /var/run/couchdb
chown: cannot access ‘/var/run/couchdb’: No such file or directory
wp01 xyz # chmod -R 0770 /etc/couchdb
wp01 xyz # chmod -R 0770 /var/lib/couchdb
wp01 xyz # chmod -R 0770 /var/log/couchdb
wp01 xyz # chmod -R 0770 /var/run/couchdb
chmod: cannot access ‘/var/run/couchdb’: No such file or directory

$ sudo -i -u couchdb couchdb -b
Password: 
Sorry, user xyz is not allowed to execute '/sbin/nologin -c couchdb -b' as couchdb on wp01.

What did I do wrong?

  • add an entry for xyz if that is your username in sudoers for couchdb xyz ALL = (couchdb) /path/to/couchdb – Drav Sloan Aug 10 '13 at 11:10
0

This error indicates a problem with your sudo permissions, not necessarily anything wrong with couchDB itself.

Check your sudoers file, and make sure your user has the correct permissions.

Note that su and sudo use different mechanisms to manage permissions - which is why you were able to use su earlier, but encountered the error when trying to use sudo.


To allow user xyz to freely use sudo, add this line to /etc/sudoers:

xyz ALL=(ALL) ALL

User xyz will then be prompted for their password (not the root password), and then allowed to continue.

I you want to skip the password prompt completely, use this instead:

xyz ALL=(ALL) NOPASSWD: ALL

There are other options available as well, that will give the access to all member of a group instead of just a particular user, or to restrict which commands they are allowed to run with sudo - but this should be enough to get you going.

One final note - you should always use the visudo command to edit /etc/sudoers, because it will do a syntax check on the file before actually saving your changes. Using a regular text editor will let you save an invalid file, potentially breaking sudo on your machine and locking you out from fixing it (if you needed to use sudo to edit the file, for example)

  • How do I change the sudo permission in that file? # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password #%wheel ALL=(ALL) NOPASSWD: ALL # Samples # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now #Added by Sabayon Installer %wheel ALL=ALL – user977828 Aug 10 '13 at 2:15
  • @user977828 I've updated my answer to give more information. – jcsanyi Aug 10 '13 at 17:46
-1

Solution (taken from http://praxis.edoceo.com/howto/couchdb)

$ sudo /etc/init.d/couchdb start
$ curl http://your.localhost:5984
{"couchdb":"Welcome","uuid":"0ca30c5deb1cc6a6eb631f2d6b420934","version":"1.3.1","vendor":{"name":"The Apache Software Foundation","version":"1.3.1"}}
  • This doesn't actually address the issue of the user not having sudo permissions. – jcsanyi Aug 10 '13 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.