Bug 33634 - Recent logrotate refuses to rotate Sphinx's logs
Summary: Recent logrotate refuses to rotate Sphinx's logs
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: sphinx (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-11 14:54 MSK by Nikolay A. Fetisov
Modified: 2017-10-26 21:33 MSK (History)
0 users

See Also:


Attachments
sphinx.spec.patch (164 bytes, patch)
2017-07-11 14:55 MSK, Nikolay A. Fetisov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)