Bug 11927
Summary: | Samba doesn't need logrotate; doesn't work anyway | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | vek |
Component: | samba | Assignee: | Trond Eivind Glomsrxd <teg> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-06-06 20:07:00 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
vek
2000-06-06 15:37:35 UTC
Actually the latest samba versions (2.0.6 and 2.0.7, maybe 2.0.5) should re- open the logs on HUP, this is the documented behavior. However, this does not always work, if a connection is already opened, it will keep logging to the old rotated log. I kept submitting this problem to the samba list for a long time, then I decided to solve it on my own: edit /etc/logrotate.d/samba and add "copytruncate" /var/log/samba/log.nmb { copytruncate postrotate /usr/bin/killall -HUP nmbd endscript } /var/log/samba/log.smb { copytruncate postrotate /usr/bin/killall -HUP smbd endscript } This way the logs are rotated properly because they are truncated in place and not moved/renamed. Samba rotates the log by size only if you tell it to do so. And however, there is a bug in that too in versions < 2.0.7. samba logrotation problems should be fixed as of samba-2.0.7-16 and logrotate-3.4. |