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

each update => "--fdpass" disappears #1163

Closed
promeneur opened this issue Feb 4, 2024 · 5 comments
Closed

each update => "--fdpass" disappears #1163

promeneur opened this issue Feb 4, 2024 · 5 comments

Comments

@promeneur
Copy link


Each time clamv is updated then the option "--fdpass" in the command line of clamonacc in clamonacc.service disapears

How to reproduce the problem

add the option "--fdpass" in the command line of clamonacc in clamonacc.service.

restart the pc

wait for an update of the clamav packages.

:~> clamconf -n
Checking configuration files in /etc

Config file: clamd.conf

LogSyslog = "yes"
LogFacility = "LOG_MAIL"
PidFile = "/run/clamav/clamd.pid"
LocalSocket = "/run/clamav/clamd.sock"
User = "vscan"
OnAccessIncludePath = "/home"
OnAccessExcludeUname = "vscan"

Config file: freshclam.conf

PidFile = "/run/clamav/freshclam.pid"
DatabaseMirror = "database.clamav.net"

clamav-milter.conf not found

Software settings

Version: 1.2.1
Optional features supported: MEMPOOL AUTOIT_EA06 BZIP2 LIBXML2 PCRE2 ICONV JSON RAR

Database information

Database directory: /var/lib/clamav
daily.cld: version 27130, sigs: 2049190, built on Thu Dec 21 10:38:20 2023
main.cvd: version 62, sigs: 6647427, built on Thu Sep 16 14:32:42 2021
bytecode.cvd: version 334, sigs: 91, built on Wed Feb 22 22:33:21 2023
Total number of signatures: 8696708

Platform information

uname: Linux 6.7.2-1-default #1 SMP PREEMPT_DYNAMIC Fri Jan 26 11:01:28 UTC 2024 (a52bf76) x86_64
OS: Linux, ARCH: x86_64, CPU: x86_64
Full OS version: "openSUSE Tumbleweed"
zlib version: 1.3 (1.3), compile flags: a9
platform id: 0x0a21bfbf08000000000d0201

Build information

GNU C: 13.2.1 20240125 [revision fc7d87e0ffadca49bec29b2107c1efd0da6b6ded] (13.2.1)
sizeof(void*) = 8
Engine flevel: 191, dconf: 191

Attachments

@tigerfoot
Copy link

This is fundamentally invalid, except if the service present in source is lacking that functionality which is not the case
see clamonacc/clamav-clamonacc.service.in

If you are editing a service file distributed by a package, it will be updated every time the package is updated.
If you want to add some specific configuration you have to use the correct command which is systemctl edit XXX.service this will add a specific override.conf file placed automagically in /etc/systemd/system/XXX.service.d/
systemctl daemon-reload
systemctl restart XXX.service

Then your changes will survive each package update/upgrade.

Please check systemd service documentation.

@promeneur
Copy link
Author

promeneur commented Feb 12, 2024

If I add "--fdpass" this is because

#1128

This is the advice from @micahsnyder.

Have you another solution ?

@tigerfoot
Copy link

I don't speak about if --fdpass is a good solution or not, it was critic about your complain about that flag disappear.

I can't unfortunately make it a default in my openSUSE personal package, has I need the option for non local remote ...
So you're just pleased and ask to document yourself how to use correctly systemd services.

@micahsnyder
Copy link
Contributor

@tigerfoot is correct. Make a copy of the service file that has your --fdpass edits and put it in /etc/systemd/system instead.

Additional reading here: https://askubuntu.com/questions/659267/how-do-i-override-or-configure-systemd-services

I'm going to close this ticket because it is not an issue with clamav, so much as a question about overriding systemd configurations.

I apologize for not suggesting this method earlier when suggesting adding "--fdpass". I don't work with systemd all that much and honestly had to google it myself for a refresher when writing this comment.

@promeneur
Copy link
Author

promeneur commented Feb 15, 2024

@micahsnyder

thanks

now i wait for an update of the package to say "victory"

A better doc

https://www.baeldung.com/linux/systemd-modify-config

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

No branches or pull requests

3 participants