Search code examples
ruby-on-railssphinxthinking-sphinx

sphinx search installed under root, how can i change owner?


i followed this tutorial:

http://www.andrehonsberg.com/article/install-sphinxsearch-205-in-ubuntu-1204-server

and installed sphinx on ubuntu 12 on ec2, the problem is that my rails app is running under a user called "ubuntu" and in my

searchd.log

file i see warnings that it can't access the *.spl files.

FATAL: failed to open     /home/ubuntu/sites/app/shared/db/sphinx/production/group.tmp.spl: Permission denied,   will not index. Try --rotate option.

how can i change it so all of sphinx will run under ubuntu user and not root?


Solution

  • I think the problem may come at the beginning (in the tutorial) with sudo su, you are logging as root; you should install in EC2 with sudo, only.

    I installed Sphinx in a EC2 like 1 and a half year ago, and I never used sudo su. I recommend you to uninstall Sphinx and install it again:

    1. Get the tar
    2. Configure the source code: ./configure –prefix=/usr/local
    3. Run: make
    4. Run: sudo make install

    Also, you should try Sunspot with Solr (I moved from Sphinx to Solr, it's better in my opinion for many reasons, there are many benchmarks). Hope it helps.