containers / containers/bubblewrap

--bind, --chdir and relative destination paths

Open
#498 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

Hello, I was a bit suprised by the following behaviour and I wondered if this was a WONTFIX or if my surprise was legitimate and improvable.
If I use `--dir "$PWD" --chdir "$PWD" --ro-bind aaa aaa`, I expect `aaa` to be bound in `"$PWD"`, but it's bound in `/`. I could understand not wanting to complicate things by mixing the CWD and paths, but who knows.

Test case:
```
$ cd
$ touch aaa
$ bwrap --ro-bind /bin /bin --ro-bind /usr/bin /usr/bin --ro-bind /usr/lib /usr/lib --ro-bind /lib64 /lib64 --dir "$PWD" --chdir "$PWD" --ro-bind aaa aaa sh -c 'ls -l; ls -l /'
total 0
total 16
-rw-r--r-- 1 1000 1000 0 Apr 10 11:15 aaa
drwxr-xr-x 2 0 0 4096 Apr 8 20:56 bin
drwxr-xr-x 3 1000 1000 60 Apr 10 11:16 home
drwxr-xr-x 6 0 0 8192 Apr 8 20:56 lib64
drwx------ 4 1000 1000 80 Apr 10 11:16 usr
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.