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

Can't allow usbguard device permanently #347

Closed
ibahnasy opened this issue Nov 22, 2019 · 2 comments
Closed

Can't allow usbguard device permanently #347

ibahnasy opened this issue Nov 22, 2019 · 2 comments

Comments

@ibahnasy
Copy link

ibahnasy commented Nov 22, 2019

Unable to whitelist device permanently due to filesystem restriction in the systemd unit file.
If "ReadOnlyPaths=-/" is disabled, it works fine

Package version(s): 0.7.5-1

Steps to reproduce:

# usbguard allow-device 15 -p
IPC ERROR: request id=1: FileRuleSet saving: /etc/usbguard/rules.conf: Read-only file system
@c0d3z3r0
Copy link

I had the same problem; workaround:

sudo mkdir /etc/systemd/system/usbguard.service.d
cat <<"EOF" | sudo tee /etc/systemd/system/usbguard.service.d/override.conf
[Service]
ReadWritePaths=-/dev/shm -/var/log/usbguard -/tmp -/etc/usbguard
EOF

radosroka pushed a commit that referenced this issue Dec 6, 2019
Add readwritepath to service file to make changes to rules permanent. [1]
'-' before the path means: Paths in ReadWritePaths=, ReadOnlyPaths= and InaccessiblePaths= may be prefixed with "-", in which case they will be ignored when they do not exist. [2]
Based on [1]

[1] - #347
[2] - https://www.freedesktop.org/software/systemd/man/systemd.exec.html

fix
@radosroka
Copy link
Member

Fixed in : fffd3d3

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