Skip to content

Failed to create/acquire the lock ......lock.exclusive ([Errno 13] Permission denied #3616

@ghost

Description

I have installed Debian Stretch and have installed borgbackup from backport (newest version).

First I have test a Backup on local machine. That works. Now I wan't make a backup remote.

For Understand:
SRVBackup = My Backupserver for all Backups
SRV1 = My Server for send Backup

My steps:
SRV01: Login as root, generate a key with Puttygen and put the "public key for pasting into OpenSSH authorized_keys_file" into /root/.ssh/authorized_keys

This Key from SRV1, I have insert in the same file on my SRVBackup

On my SRVBackup I have createt a new repo:
borg init --encryption=repokey /home/myuser/backups/SRV1

Now I test it:
borg list ssh://myuser@iptosrv1:22/~/backups/srv1

Result

ssh://myuser@iptosrv1:22/~/backups/srv1
myuser@iptosrv1:'s password:
Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/borg/remote.py", line 248, in serve
    res = f(**args)

  File "/usr/lib/python3/dist-packages/borg/remote.py", line 374, in open
    self.repository.__enter__()  # clean exit handled by serve() method

  File "/usr/lib/python3/dist-packages/borg/repository.py", line 181, in __enter__
    self.open(self.path, bool(self.exclusive), lock_wait=self.lock_wait, lock=self.do_lock)

  File "/usr/lib/python3/dist-packages/borg/repository.py", line 377, in open
    self.lock = Lock(os.path.join(path, 'lock'), exclusive, timeout=lock_wait, kill_stale_locks=hostname_is_unique()).acquire()

  File "/usr/lib/python3/dist-packages/borg/locking.py", line 349, in acquire
    with self._lock:

  File "/usr/lib/python3/dist-packages/borg/locking.py", line 113, in __enter__
    return self.acquire()

  File "/usr/lib/python3/dist-packages/borg/locking.py", line 137, in acquire
    raise LockFailed(self.path, str(err)) from None

borg.locking.LockFailed: Failed to create/acquire the lock /home/myuser/backups/srv1/lock.exclusive ([Errno 13] Permission denied: '/home/myuser/backups/srv1/lock.exclusive').

Borg server: Platform: Linux vm02 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64
Borg server: Linux: debian 9.3
Borg server: Borg: 1.1.4  Python: CPython 3.5.3
Borg server: PID: 13896  CWD: /home/myuser
Borg server: sys.argv: ['/usr/bin/borg', 'serve', '--umask=077']
Borg server: SSH_ORIGINAL_COMMAND: None
Platform: Linux srv1 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64
Linux: debian 9.3
Borg: 1.1.4  Python: CPython 3.5.3
PID: 5409  CWD: /root/backup
sys.argv: ['/usr/bin/borg', 'list', 'ssh://myuser@iptosrv1::22/~/backups/srv1']
SSH_ORIGINAL_COMMAND: None





Can someone see my mistake?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions