Bug 33634

Summary: Recent logrotate refuses to rotate Sphinx's logs
Product: Sisyphus Reporter: Nikolay A. Fetisov <naf>
Component: sphinxAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3    
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
sphinx.spec.patch none

Description Nikolay A. Fetisov 2017-07-11 14:54:00 MSK
Для sphinx-2.2.11-alt3 конфигурация logrotate.d/sphinx вызывает проблемы 
с текущим logrotate:

# logrotate -f /etc/logrotate.d/sphinx
error: skipping "/var/log/sphinx/query.log" because parent directory has insecure permissions (it's group writable and has no sticky bit set); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/sphinx/searchd.log" because parent directory has insecure permissions (it's group writable and has no sticky bit set); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.

Для исправления достаточно добавить в скрипт logrotate'а строку
su _sphinx _sphinx

Сам скрипт создаётся в spec-файле.
Comment 1 Nikolay A. Fetisov 2017-07-11 14:55:09 MSK
Created attachment 7141 [details]
sphinx.spec.patch
Comment 2 Repository Robot 2017-10-26 21:33:59 MSK
sphinx-2.2.11-alt5.S1 -> sisyphus:

Thu Oct 26 2017 Anton Farygin <rider@altlinux.ru> 2.2.11-alt5.S1
- fixed localstatedir location
- fixed typo in systemd unit (closes: #33177)
- rotate logs under unprivileged user (closes: #33634)