@@ -12,19 +12,50 @@ can be a space or comma-separated subset of: `mbed-crypto-provider`, `pkcs11-pro
12
12
` tpm-provider ` . Choose the providers you want to install depending on what is available on the
13
13
platform.
14
14
15
- Create the Parsec socket directory.
15
+ ## From an admin user with privileges
16
+
17
+ Create the ` parsec ` user.
18
+
19
+ ```
20
+ sudo useradd -m parsec
21
+ sudo passwd parsec
22
+ ```
23
+
24
+ Create the following Parsec directories, with good permissions.
25
+
26
+ ` /var/lib/parsec ` for storing persistent data like the ` mappings ` folder. The service will run from
27
+ here.
16
28
17
29
```
18
- mkdir /tmp/parsec
30
+ sudo mkdir /var/lib/parsec
31
+ sudo chown parsec /var/lib/parsec
32
+ sudo chmod 700 /var/lib/parsec
19
33
```
20
34
21
- Create the ` parsec-clients ` group and set the correct permissions on the socket folder. Mutually
35
+ ` /etc/parsec ` to contain the configuration file.
36
+
37
+ ```
38
+ sudo mkdir /etc/parsec
39
+ sudo chown parsec /etc/parsec
40
+ sudo chmod 700 /etc/parsec
41
+ ```
42
+
43
+ ` /usr/libexec/parsec ` to contain the ` parsec ` executable binary file.
44
+
45
+ ```
46
+ sudo mkdir /usr/libexec/parsec
47
+ sudo chown parsec /usr/libexec/parsec
48
+ sudo chmod 700 /usr/libexec/parsec
49
+ ```
50
+
51
+ ` /run/parsec ` to contain the socket file. The ` parsec-clients ` group needs to be created. Mutually
22
52
trusted Parsec Clients will need to be in that group.
23
53
24
54
```
25
55
sudo groupadd parsec-clients
26
- sudo chown :parsec-clients /tmp/parsec
27
- sudo chmod 750 /tmp/parsec
56
+ sudo mkdir /run/parsec
57
+ sudo chown parsec:parsec-clients /run/parsec
58
+ sudo chmod 750 /run/parsec
28
59
```
29
60
30
61
For example, adding the imaginary ` parsec-client-1 ` user to the ` parsec-clients ` group:
@@ -34,32 +65,36 @@ sudo usermod -a -G parsec-clients parsec-client-1
34
65
```
35
66
36
67
Users just added to that group might need to log-out and log-in again to make sure the change apply.
68
+ They can also try the ` newgrp ` command with no parameters to re-initialize their environment.
69
+
70
+ ## From the parsec user
37
71
38
- Create and log in to a new user named ` parsec ` .
72
+ Log in to ` parsec ` .
39
73
40
74
```
41
- sudo useradd -m parsec
42
- sudo passwd parsec
43
75
su --login parsec
44
76
```
45
77
46
78
Depending on which features of Parsec the ` parsec ` user is going to use, it might need to be given
47
79
more privileges in order to access some resources on the system. Refer to the
48
80
[ Providers] ( providers.md ) page for more information.
49
81
50
- In its home directory, pull and install Parsec as a daemon. If a Rust toolchain is not available
51
- widely on the system, it will need to be [ installed] ( https://www.rust-lang.org/tools/install ) for
52
- that specific user.
82
+ In its home directory, clone and compile Parsec. If a Rust toolchain is not available widely on the
83
+ system, it will need to be [ installed] ( https://www.rust-lang.org/tools/install ) for that specific
84
+ user.
85
+
86
+ Below is an example with Parsec 0.5.0, update with the version you want!
53
87
54
88
```
55
- cargo install parsec-service --features $DESIRED_FEATURES
89
+ git clone --branch 0.5.0 https://github.com/parallaxsecond/parsec
90
+ cargo build --manifest-path parsec --features $DESIRED_FEATURES --release
91
+ cp parsec/target/release/parsec /usr/libexec/parsec
56
92
```
57
93
58
- Copy and adapt the [ configuration] ( configuration.md ) you want to use. For a secure deployment, make
59
- sure to activate the ` log_error_details ` option and to use a ` trace ` log level.
94
+ Copy and adapt the [ configuration] ( configuration.md ) you want to use.
60
95
61
96
```
62
- cp parsec/config.toml config.toml
97
+ cp parsec/config.toml /etc/parsec/ config.toml
63
98
```
64
99
65
100
Install the systemd unit files and activate the Parsec socket.
@@ -71,27 +106,31 @@ systemctl --user enable parsec
71
106
systemctl --user start parsec
72
107
```
73
108
74
- ` parsec-clients ` users can now use Parsec! You can test it (having logged in a ` parsec-clients `
75
- user) going inside the ` parsec/e2e_tests ` directory and:
109
+ Check the Parsec logs with:
76
110
77
111
```
78
- cargo test normal_tests
112
+ journalclt --user -u parsec
79
113
```
80
114
81
- * Note:* if you encounter a "Permission Denied" error while executing the end-to-end tests, make sure
82
- that the group change has taken effect. You can check it by calling ` groups ` with no arguments. If
83
- you do not see ` parsec-clients ` , please try logging the user out and in again to apply the change.
84
-
85
- Check the Parsec logs with:
115
+ Also reload the service with:
86
116
87
117
```
88
- journalclt --user -u parsec
118
+ systemctl --user kill -s HUP parsec
89
119
```
90
120
91
- Reload the service:
121
+ ## From a parsec-clients user
122
+
123
+ ` parsec-clients ` users can now use Parsec! You can test it (having logged in a ` parsec-clients `
124
+ user) by installing the [ ` parsec-tool ` ] ( https://github.com/parallaxsecond/parsec-tool ) :
92
125
93
126
```
94
- systemctl --user kill -s HUP parsec
127
+ $ parsec-tool ping
128
+ [INFO] Pinging Parsec service...
129
+ [SUCCESS] Service wire protocol version is 1.0.
95
130
```
96
131
132
+ * Note:* if you encounter a "Permission Denied" error while executing the end-to-end tests, make sure
133
+ that the group change has taken effect. You can check it by calling ` groups ` with no arguments. If
134
+ you do not see ` parsec-clients ` , please try logging the user out and in again to apply the change.
135
+
97
136
* Copyright 2019 Contributors to the Parsec project.*
0 commit comments