PermissionError: [Errno 13] Permission denied: '/tmp/buskill.log'
Describe the bug If a user starts buskill as one user and then later starts it as another user, the BusKill app will fail to start with the following error
PermissionError: [Errno 13] Permission denied: '/tmp/buskill.log'
To Reproduce Steps to reproduce the behavior:
- Install Debian 12
- Install BusKill
sudo apt-get install buskill - Become root
sudo su - - Start BusKill
buskill - Either leave [4] open or close it with SIGTERM
- Open buskill as another user
buskill - See errro
Expected behavior
BusKill should start as any user, regardless of previous runs by other users
Probably it would be wise to move the BusKill log file into a system CACHE dir or buskill-specific CACHE dir.
We should also default to not storing >1 run in the log file, such that on-start the app overwrites the previous log file's contents (unless persist debug log is enabled). Also, we should catch permission errors on attempt to write to a given log file and then just append a timestamp to the filename.
Screenshots If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS: Debian 12
- BusKill: 0.6.0+git20221227.e1539d2-4
See also https://github.com/BusKill/buskill-app/issues/31