3 ms·
sudo unshare -m bash -c "mount --make-rslave /home ; mount -n --make-rprivate -o bind /tmp/empty /home ; sudo -u $(whoami) firefox -ProfileManager -no-remote"
by martius 11y ago
sudo unshare -m bash -c "mount --make-rslave /home ; mount -n --make-rprivate -o bind /tmp/empty /home ; sudo -u $(whoami) firefox -ProfileManager -no-remote"
- creates an empty directory,
- fork the mount table for the new bash process and its children (requires privileges),
- unshare /home (required if / is mounted in shared mode [1]),
- hide /home by mount-binding the empty directory,
- start firefox in unprivilegied mode, without being able to access to user's files.
[1] https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt https://www.kernel.org/doc/Documentation/filesystems/shareds...
- kuschku 11y agoStill doesn’t fix X11 access