Skip to content

Missing support for multiple users on the same host / same lock-file used by user and root #1122

@mat-m

Description

@mat-m

Hello

I had an issue where snapshots were not taken.
I decided to run in CLI with /usr/bin/backintime backup --debug and got:

DEBUG: [common/snapshots.py:1751 Snapshots.flockExclusive] Set flock /tmp/backintime.lock
Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 1165, in <module>
    startApp()
  File "/usr/share/backintime/common/backintime.py", line 517, in startApp
    args.func(args)
  File "/usr/share/backintime/common/backintime.py", line 739, in backup
    ret = takeSnapshot(cfg, force)
  File "/usr/share/backintime/common/backintime.py", line 94, in takeSnapshot
    ret = snapshots.Snapshots(cfg).backup(force)
  File "/usr/share/backintime/common/snapshots.py", line 633, in backup
    self.flockExclusive()
  File "/usr/share/backintime/common/snapshots.py", line 1752, in flockExclusive
    self.flock = open(self.GLOBAL_FLOCK, 'w')
PermissionError: [Errno 13] Permission denied: '/tmp/backintime.lock'

Actually, the lock belongs to the other user, which also has a @reboot job, but starts before me.

Flock should hold user & BIT profile name, IMO.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions