Skip to content
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

fix: Attempt to create log file if it does not exist. #1322

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

userwiths
Copy link
Contributor

Fixes: #1155
It might seem a bit messy but the gist of the PR is that.

  • We introduce fc_upsert_logg_file method, which attempts to create the directories & log file as required.
  • We move the drop_privileges case/branch later during the execution. If we do this before we fc_upsert_logg_file our log file, then we can't use root privileges even if freshclam is started as root.
  • In order to chown the directories (and file, overkill?) we introduce the field dbOwner in the fc_config structure.

Seems this has been handled in documentation as a step of the setup.

@userwiths userwiths marked this pull request as ready for review August 15, 2024 06:04
@userwiths
Copy link
Contributor Author

@micahsnyder tagging you cause this might have been forgotten. Managed to get the CI all green and put it in review. Just a reminder.

@micahsnyder micahsnyder self-requested a review September 9, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clamav freshclam fails when /var/log/clamav/freshclam.log does not exist
1 participant