Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/manuals/engine/security/rootless/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ weight: 30
1. Create and install the currently logged-in user's AppArmor profile:

```console
$ filename=$(echo $HOME/bin/rootlesskit | sed -e s@^/@@ -e s@/@.@g)
$ export filename=$(echo $HOME/bin/rootlesskit | sed -e s@^/@@ -e s@/@.@g)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export is probably not needed here.

We should probably quote the sed commands just to be sure:

Suggested change
$ export filename=$(echo $HOME/bin/rootlesskit | sed -e s@^/@@ -e s@/@.@g)
$ filename=$(echo $HOME/bin/rootlesskit | sed -e 's@^/@@' -e 's@/@.@g')

$ cat <<EOF > ~/${filename}
abi <abi/4.0>,
include <tunables/global>
Expand All @@ -36,7 +36,7 @@ weight: 30
include if exists <local/${filename}>
}
EOF
$ sudo mv ~/${filename} /etc/apparmor.d/${filename}
$ [ -f ~/"${filename}" ] && sudo mv ~/${filename} /etc/apparmor.d/${filename}
```
2. Restart AppArmor.

Expand Down Expand Up @@ -382,4 +382,4 @@ remove the binary files under `~/bin`:
```console
$ cd ~/bin
$ rm -f containerd containerd-shim containerd-shim-runc-v2 ctr docker docker-init docker-proxy dockerd dockerd-rootless-setuptool.sh dockerd-rootless.sh rootlesskit rootlesskit-docker-proxy runc vpnkit
```
```