-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown groups/users don't appear to be rotated #25
Comments
Logrotate need to know under which permission he has to create the rotated files. Files with unknown user or group are currently ignored. |
… default user. (Default root)
Default behavior is now set to not ignore any files with unknown user or group but rotate it with the default user. This should not be any problem because container's default user is root. Would be a problem, when the container is not run as root. |
That's awesome! Off the top of your head, would logrotate accept uid/gid in the generated config file? I might give that a try. |
No |
I ended up writing a script that generates users dynamically when required. Is this something you would be interested in adding to the project? |
Yes |
I have many log files present in
/var/log/company_name
to be rotated on an hourly basis into/var/log/company_name/rotated
, keeping the past 24-hours. All logs seem to be rotating except a select few, which grow to gigabytes in size.Upon inspecting the logrotate logs with
docker logs logrotate
, it appears that all the logfiles that aren't rotating have the following message printed when processing:However, logfiles that are properly rotated have the following message printed:
Other notes:
User:
root
Logrotate version:
1.2
Logrotate hash:
sha256:e0d5e50a8716d7859079df4849f9034c56d0cb38ed46ad118b87e41f8a9437d6
Capabilities:
dac_override
,setgid
,setuid
Network:
none
Environment:
I also tried enabling all capabilities and the network without any luck.
The error message appear accurate when running an
ls -lahS
on the log directory. But I don't understand why logrotate won't touch those files or how to force it to work with those files.The text was updated successfully, but these errors were encountered: