Merge branch 'pr-1292'

This commit is contained in:
Andrew David Wong 2023-12-11 02:10:56 -08:00
commit 7548fb5910
No known key found for this signature in database
GPG Key ID: 8CE137352A019A17

View File

@ -24,19 +24,21 @@ In this way sys-whonix can benefit from the Tor anonymity feature 'persistent To
## How to use bind-dirs.sh? ## ## How to use bind-dirs.sh? ##
In this example, we want to make `/var/lib/tor` persistent. In this example, we want to make `/var/lib/tor` persistent. Enter all of the following commands in your app qube.
Inside the app qube. 1. Make sure the directory `/rw/config/qubes-bind-dirs.d` exists.
1. Make sure folder `/rw/config/qubes-bind-dirs.d` exists.
``` ```
sudo mkdir -p /rw/config/qubes-bind-dirs.d sudo mkdir -p /rw/config/qubes-bind-dirs.d
``` ```
2. Create a file `/rw/config/qubes-bind-dirs.d/50_user.conf` with root rights. 2. Create the file `/rw/config/qubes-bind-dirs.d/50_user.conf` with root permissions, if it doesn't already exist.
3. Edit the file 50_user.conf to append a folder or file name to the `binds` variable. ```
sudo touch /rw/config/qubes-bind-dirs.d/50_user.conf
```
3. Add a line to `/rw/config/qubes-bind-dirs.d/50_user.conf` that appends a folder or file to the `binds` variable.
``` ```
binds+=( '/var/lib/tor' ) binds+=( '/var/lib/tor' )
@ -44,14 +46,22 @@ Inside the app qube.
4. Save. 4. Save.
5. Reboot the app qube. 5. If the directory you wish to make persistent doesn't exist in the template on which the app qube is based, you'll need to create the directory (with its full path) under `/rw/bind-dirs` in the app qube. For example, if `/var/lib/tor` didn't exist in the template, then you would execute the following command in your app qube:
6. Done. ```
sudo mkdir -p /rw/bind-dirs/var/lib/tor
```
From now on any files within the `/var/lib/tor` folder will persist across reboots. 6. (optional) If the directory you want to persist across reboots (`/var/lib/tor` in this case) needs special ownership and permissions, make sure the directory you created just under `/rw/bind-dirs/` has the same ones (using the commands `chown` and `chmod`, respectively).
You can make make many files or folders persist, simply by making multiple entries in the `50_user.conf` file, each on a separate line. 7. Reboot the app qube.
For example, if you added the file `/etc/tor/torrc` to the `binds` variable, any modifications to *that* file will persist across reboots.
8. Done.
From now on, all files in the `/var/lib/tor` directory will persist across reboots.
You can make make as many files or folders persist as you want simply by making multiple entries in the `50_user.conf` file, each on a separate line.
For example, if you added the file `/etc/tor/torrc` to the `binds` variable, any modifications to *that* file would also persist across reboots.
``` ```
binds+=( '/var/lib/tor' ) binds+=( '/var/lib/tor' )