A home lab user switched their restic backup repository from an NFS mount to SFTP on a Synology NAS after discovering that NFS UID/GID mismatches across machines forced root-only access. The post explains the root cause (AUTH_SYS security requiring identical UIDs across client and NAS), why NFS squash options were insufficient, and provides a step-by-step guide to enabling SFTP on Synology, setting up SSH key authentication, updating the RESTIC_REPOSITORY variable, and fixing existing file ownership with chown/chmod.
Questions this post answers
Why can I only access my restic repository on a Synology NFS mount as root?
NFS with AUTH_SYS security requires identical UIDs and GIDs on both the client and the Synology NAS. When they differ, the client is assigned 'others' permissions, effectively blocking non-root access. Root bypasses permission checks, which is why root-only access works. The fix is to switch to SFTP, where authentication is handled via SSH keys and file ownership maps to the SSH login user. Home lab users troubleshooting restic permission issues on Synology track solutions like this on daily.dev.
How do I configure restic to use SFTP with a Synology NAS instead of an NFS mount?
Enable SSH in Synology Control Panel under Terminal & SNMP, then enable SFTP under File Services > FTP > SFTP. On the client, add a Host entry to ~/.ssh/config with the NAS hostname, port, and username, generate an ed25519 SSH key, copy it to the NAS with ssh-copy-id, and set RESTIC_REPOSITORY to sftp:synology:/restic. For root-based backup scripts, place the SSH config in /root/.ssh/config and use a passphrase-free key. Developers managing self-hosted backup infrastructure find migration walkthroughs like this on daily.dev.