unveil - unveil certain paths when running a command
$ unveil [--path] [command...]
Run a command under certain path restrictions by using unveil
(2).
-u
, --path
: Unveil a path, with the format of permissions,path
Run ls -la /sys/kernel
with restricted access to certain paths:
$ unveil --path=r,/etc/timezone --path=r,/usr/lib --path=r,/sys/ --path=r,/etc/passwd --path=r,/etc/group ls -la /sys/kernel
Run ps -ef
with restricted access to certain paths:
$ unveil --path=r,/etc/timezone --path=r,/usr/lib --path=r,/sys/ --path=r,/etc/passwd --path=r,/etc/group ps -ef