File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ mount-point = /var/tmp
5656
5757This will set up a /dev/zram1 with ext2 and generate a mount unit for /var/tmp.
5858
59+ In case you want this path to be user-writable, you can use following
60+ "high-quality hack" until ` systemd-makefs ` provides a proper mechanism to
61+ set ownership of a generated filesystem. For the above example, create an
62+ override for
` [email protected] ` , for example with
` systemctl edit ` ,
63+ containing the following (note the sticky bit as required for [ /var] /tmp):
64+
65+ ``` ini
66+ [Service]
67+ ExecStartPost =/bin/sh -c ' d=$(mktemp -d); mount "$1" "$d"; chmod 1777 "$d"; umount "$d"; rmdir "$d"' _ /dev/%i
68+ ```
69+
5970### Rust
6071
6172The second purpose of this program is to serve as an example of a systemd
You can’t perform that action at this time.
0 commit comments