Bug 32822

Summary: Ошибка ротации лог-файлов, у которых владелец не root
Product: Branch p8 Reporter: Alexei Takaseev <taf>
Component: syslog-commonAssignee: Andrey Cherepanov <cas>
Status: CLOSED WONTFIX QA Contact: qa-p8 <qa-p8>
Severity: normal    
Priority: P3 CC: asy, lav
Version: не указана   
Hardware: all   
OS: Linux   

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 исправлено.