R
R
RabIN2018-09-29 20:14:12
Sphinx
RabIN, 2018-09-29 20:14:12

FATAL: failed to open log file '/var/log/sphinxsearch/searchd.log': Permission denied, how to fix?

Good evening.
I get the following error when I enter the command.

/etc/init.d/sphinxsearch restart
Restarting sphinxsearch: Sphinx 2.2.11-id64-release (95ae9a6)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
WARNING: key 'max_matches' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'enable_star' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
FATAL: failed to open log file '/var/log/sphinxsearch/searchd.log': Permission denied

I understand that the Sphinx does not have write permissions.
What permissions should be set on folders
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
pid_file = /var/run/sphinxsearch/searchd.pid
binlog_path = /var/lib/sphinxsearch /data/
path = /var/lib/sphinxsearch/data/bitrix
so that the sphinx works correctly.
I understand that you need to create a sphinx user, right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
ManticoreSearch, 2018-10-01
@RabIN

The permissions on searchd.log should be set such that the user under which the searchd process is running can write to searchd.log. Accordingly, in order to accurately answer this question, you need to know under which user it works.
It is not necessary to create a sphinx user, but it is desirable for security.
In order to somehow start, you can do chmod 777 /var/log/sphinxsearch/searchd.log and similarly for any other files that it will swear at. Then, after starting, you can do ps aux|grep searchd, see the user under which it works and already set the correct rights through chown user:user /path/to/some/file , where user:user is the user and group that you need to set for the file .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question