buskill-app icon indicating copy to clipboard operation
buskill-app copied to clipboard

PermissionError: [Errno 13] Permission denied: '/tmp/buskill.log'

Open maltfield opened this issue 2 years ago • 1 comments

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:

  1. Install Debian 12
  2. Install BusKill sudo apt-get install buskill
  3. Become root sudo su -
  4. Start BusKill buskill
  5. Either leave [4] open or close it with SIGTERM
  6. Open buskill as another user buskill
  7. 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

maltfield avatar Jun 19 '23 19:06 maltfield

See also https://github.com/BusKill/buskill-app/issues/31

maltfield avatar Jun 19 '23 19:06 maltfield