mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
added bubblewrap docs + script
This commit is contained in:
parent
22cbd2dbb5
commit
3582a1004c
|
@ -144,6 +144,9 @@ just run **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/
|
||||||
* or if you are on android, [install copyparty in termux](#install-on-android)
|
* or if you are on android, [install copyparty in termux](#install-on-android)
|
||||||
* or maybe you have a [synology nas / dsm](./docs/synology-dsm.md)
|
* or maybe you have a [synology nas / dsm](./docs/synology-dsm.md)
|
||||||
* or if your computer is messed up and nothing else works, [try the pyz](#zipapp)
|
* or if your computer is messed up and nothing else works, [try the pyz](#zipapp)
|
||||||
|
* or if you don't trust copyparty yet and want to isolate it a little, then...
|
||||||
|
* ...maybe [prisonparty](./bin/prisonparty.sh) to create a tiny [chroot](https://wiki.archlinux.org/title/Chroot) (very portable),
|
||||||
|
* ...or [bubbleparty](./bin/bubbleparty.sh) to wrap it in [bubblewrap](https://github.com/containers/bubblewrap) (much better)
|
||||||
* or if you prefer to [use docker](./scripts/docker/) 🐋 you can do that too
|
* or if you prefer to [use docker](./scripts/docker/) 🐋 you can do that too
|
||||||
* docker has all deps built-in, so skip this step:
|
* docker has all deps built-in, so skip this step:
|
||||||
|
|
||||||
|
@ -1186,7 +1189,7 @@ dependencies: `python3 -m pip install --user -U impacket==0.11.0`
|
||||||
|
|
||||||
some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
|
some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
|
||||||
* not entirely confident that read-only is read-only
|
* not entirely confident that read-only is read-only
|
||||||
* the smb backend is not fully integrated with vfs, meaning there could be security issues (path traversal). Please use `--smb-port` (see below) and [prisonparty](./bin/prisonparty.sh)
|
* the smb backend is not fully integrated with vfs, meaning there could be security issues (path traversal). Please use `--smb-port` (see below) and [prisonparty](./bin/prisonparty.sh) or [bubbleparty](./bin/bubbleparty.sh)
|
||||||
* account passwords work per-volume as expected, and so does account permissions (read/write/move/delete), but `--smbw` must be given to allow write-access from smb
|
* account passwords work per-volume as expected, and so does account permissions (read/write/move/delete), but `--smbw` must be given to allow write-access from smb
|
||||||
* [shadowing](#shadowing) probably works as expected but no guarantees
|
* [shadowing](#shadowing) probably works as expected but no guarantees
|
||||||
|
|
||||||
|
|
|
@ -78,3 +78,6 @@ cd /mnt/nas/music/.hist
|
||||||
# [`prisonparty.sh`](prisonparty.sh)
|
# [`prisonparty.sh`](prisonparty.sh)
|
||||||
* run copyparty in a chroot, preventing any accidental file access
|
* run copyparty in a chroot, preventing any accidental file access
|
||||||
* creates bindmounts for /bin, /lib, and so on, see `sysdirs=`
|
* creates bindmounts for /bin, /lib, and so on, see `sysdirs=`
|
||||||
|
|
||||||
|
# [`bubblewrap.sh`](bubblewrap.sh)
|
||||||
|
* run copyparty in an isolated process, preventing any accidental file access and more
|
||||||
|
|
19
bin/bubblewrap.sh
Executable file
19
bin/bubblewrap.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# usage: ./bubblewrap.sh ./copyparty-sfx.py ....
|
||||||
|
bwrap \
|
||||||
|
--unshare-all \
|
||||||
|
--ro-bind /usr /usr \
|
||||||
|
--ro-bind /bin /bin \
|
||||||
|
--ro-bind /lib /lib \
|
||||||
|
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||||
|
--dev-bind /dev /dev \
|
||||||
|
--dir /tmp \
|
||||||
|
--dir /var \
|
||||||
|
--bind $(pwd) $(pwd) \
|
||||||
|
--share-net \
|
||||||
|
--die-with-parent \
|
||||||
|
--file 11 /etc/passwd \
|
||||||
|
--file 12 /etc/group \
|
||||||
|
"$@" \
|
||||||
|
11< <(getent passwd $(id -u) 65534) \
|
||||||
|
12< <(getent group $(id -g) 65534)
|
Loading…
Reference in a new issue