Skip to content

Storing [BORG_CACHE_DIR|BORG_SECURITY_DIR] files as a non-root user while being able to backup files owned by root? #8044

@trendymail

Description

@trendymail

Hello!

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Honestly, no: I think this might be outside of Borg's scope (or not... ^^).

Is this a BUG / ISSUE report or a QUESTION?

Question.

Your borg version (borg -V).

borg-linuxold64 1.2.7 (standalone binary)

Operating system (distribution) and version.

OpenVZ 7 => ldd (GNU libc) 2.17 (yes, you read it right...)

Long story short 1

I would like to run Borg (create) as an unprivileged user (eq: borg-backup => uid 6666).

But I also need Borg to backup files owned by root (--stdin-user USER might help but not convenient).

Long story short 2

I need files present in [BORG_CACHE_DIR|BORG_SECURITY_DIR] to be owned by a non-root user (eg: borg-backup)

But I also need to run Borg using a script executed by "root" or "borg-backup" (uid 6666).

Long story short 3

I tried "Setgid bit" (Borg binaries and tgz), tried "sudo -u borg-backup -- borg-linuxold64" and some other stupid things...

Is there a clean way to invoke Borg to store internal data (config/cache/security) as a normal user while being able to save some files owned by root?

Please, feel free to send me a RTFM and close this issue if I missed something.

Have a great night!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions