56

Let's say you have access to a remote machine and use it to copy backups occasionally, eg with rsync. Your local machine has credentials stored that allow write access on the remote machine, however if the local account was compromised that could also allow access to the remote machine and the data stored there.

How can you grant access to an account to write remotely, but also protect the data from this account? One possibility could be to change the permissions on the data after it is copied to prevent deletion/interference, although I'm just making this up. Is there a standard practise for this?

you are viewing a single comment's thread
view the rest of the comments
[-] non_burglar@lemmy.world 3 points 1 week ago

What's the rationale for this? Genuinely curious.

Why downvote this?

[-] bcnelson@lemmy.world 22 points 1 week ago

The reasoning is that your backup server should be more secure than production. Production has to have a bunch of stuff open in order to be useful and convenient. The backup server does not. It can be basically fully locked down.

[-] Onomatopoeia@lemmy.cafe 5 points 1 week ago

To add - by doing pulls the backup server uses different credentials to run than the credentials used to perform pulls.

Backup server has it's own credentials database, machines being backed up have their own database. Backup service in backup server uses appropriate credentials from machine being backed up to access the data there (shares, etc). So credentials from compromised machine are unrelated to credentials for backup server.

And if backups are done properly (full on a schedule, daily incrementals, or something similar) you should be able to revert to a known-good state with minimal data loss.

[-] pgo_lemmy@feddit.it 6 points 1 week ago* (last edited 1 week ago)

If the main site gets compromised the credentials there must be considered lost and known to che attackers.

with a pull backup that's not an issue because the main site has no access to the remote system; it is a process on the remote site that has credentials to access the main site and not the other way around.

the remote system may ~~receive~~ retrieve a compromised copy of the data, but the attacker cannot tamper with previous backups so recovery is still possible.

[-] lIlIllIlIIIllIlIlII@lemmy.zip 1 points 1 week ago

This is the main reason I had in my head about pull backups. Thanks for the explanation.

[-] non_burglar@lemmy.world 1 points 1 week ago

That makes sense. I use NFS, so there are other controls for security because "offsite" is another building on my property, but still in the same pool of subnets...

this post was submitted on 19 Jun 2026
56 points (95.2% liked)

Selfhosted

60177 readers
534 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS