Say I run a program like so:
cd foo && program x y z
How can I give program access to only the directories in foo and below?
Pretend my fs looks like:
$HOME/
foo/
bar/
baz/
if I run program in the foo/ dir, it obviously shouldn't have access to what's in bar/ or baz/, etc.
NOTE: My distro is Ubuntu 16.04 if that makes any difference.
unsharecommand was on my CentOS 7.x by default.unsharecmd is inutil-linux-2.23.2-43.el7_4.2.x86_64. Thats part of defs. I've never contemplated usingchrootor any of this directly, usually just go to adockercontainer instead. – slm Jul 09 '18 at 17:57run x, whererunis a program that will give thexexecutable only permissions to directories below cwd, etc. – Alexander Mills Jul 12 '18 at 05:00