![](https://seccdn.libravatar.org/avatar/d5c24adf366c9cf8a15b880162e9e06e.jpg?s=120&d=mm&r=g)
14 Sep
2020
14 Sep
'20
16:32
... snip ...
graphically any background tasks and programs that you have running will remain running. This is useful for people who use screen etc and keep background processes running, however if you want to make sure that when someone logs out any of there remaining processes are killed you can set KillUserProcesses=yes in /etc/systemd/logind.conf This may be a quick and easy way of resolving the issue.
This would not help if the process accessing the disk is not owned by the user - such as service/daemon/userByCron/isForked/etc.
I've set KillUserProcesses=yes in /etc/systemd/logind.conf and rebooted, then tested again, but with the same result.