Bug 32822 - Ошибка ротации лог-файлов, у которых владелец не root
Summary: Ошибка ротации лог-файлов, у которых владелец не root
Status: CLOSED WONTFIX
Alias: None
Product: Branch p8
Classification: Distributions
Component: syslog-common (show other bugs)
Version: не указана
Hardware: all Linux
: P3 normal
Assignee: Andrey Cherepanov
QA Contact: qa-p8@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-30 08:17 MSK by Alexei Takaseev
Modified: 2022-08-25 13:21 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Takaseev 2016-11-30 08:17:38 MSK
Ошибка ротации лог-файлов, у которых владелец не root:

==================
error: skipping "/var/log/uucp/errors" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/uucp/info" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/uucp/warnings" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
=================

Лечится правкой /etc/logrotate.d/syslog:

 /var/log/uucp/* {
+       su uucp uucp
        rotate 5
        weekly
        postrotate
Comment 1 Sergey Y. Afonin 2017-01-15 12:42:31 MSK
# rpm -qf /etc/logrotate.d/syslog
syslog-common-1.4.1-alt30

Это не на logrotate должно висеть...

*** This bug has been marked as a duplicate of bug 31636 ***
Comment 2 Vitaly Lipatov 2019-10-26 16:29:44 MSK
На p8 ничего не изменилось:

[root@as logrotate.d]# logrotate syslog 
error: skipping "/var/log/uucp/errors" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/uucp/info" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/uucp/warnings" because parent directory has insecure permissions (it's not owned by "root"); consider using "su" directive in config file to tell logrotate which user/group should be used for rotation.


# rpm -qf /etc/logrotate.d/syslog
syslog-common-1.4.1-alt30

* Чт фев 12 2009 Dmitry V. Levin <ldv@altlinux.org> 1.4.1-alt30
- klogd: Defined more syslog symbols to overcome unsuitable
  glibc syslog implementation.

# cat /etc/logrotate.d/syslog
/var/log/uucp/* {
	rotate 5
	weekly
	postrotate
		/sbin/reload-syslog >/dev/null
	endscript
}
Comment 3 Sergey Y. Afonin 2020-05-05 13:28:24 MSK
Наверное можно собрать (давно было) 1.4.1-alt30.M80P.1 без syslog-common, а syslog-common скопировать из p9. Или совместить с Bug 29539.
Comment 4 Sergey Y. Afonin 2022-08-25 13:21:52 MSK
Для p8 исправлено не будет, начиная с p9 исправлено.