From 06aa0f08cb5398e87eb206ad241e13d371514258 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 6 Sep 2025 19:00:12 +0200 Subject: [PATCH] docs: fix permission setup for group-accessible repo The group always needs execute access for the directories. In addition, files should be always set to read-only for everyone as restic never modifies files. --- doc/030_preparing_a_new_repo.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/030_preparing_a_new_repo.rst b/doc/030_preparing_a_new_repo.rst index fb7963739..6adfe63b2 100644 --- a/doc/030_preparing_a_new_repo.rst +++ b/doc/030_preparing_a_new_repo.rst @@ -798,7 +798,7 @@ permission bit to all repository files with ``chmod``: .. code-block:: console - $ chmod -R g+r /srv/restic-repo + $ chmod -R g+rX /srv/restic-repo This serves two purposes: 1) it sets the read permission bit on the repository config file triggering restic's logic to create new files as @@ -825,8 +825,8 @@ setup once: .. code-block:: console - # find /srv/restic-repo -type d -exec chmod g+s '{}' \; - $ chmod -R g+rw /srv/restic-repo + $ chmod -R g+rX /srv/restic-repo + $ find /srv/restic-repo -type d -exec chmod g+sw '{}' \; This sets the ``setgid`` bit on all existing directories in the repository and then grants read/write permissions for group access.