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.
This commit is contained in:
Michael Eischer
2025-09-06 19:00:12 +02:00
parent 3ae6a69154
commit 06aa0f08cb

View File

@@ -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.