setpriv 配置运行程序的权限

发布时间: 更新时间: 总字数:198 阅读时间:1m 作者: IP上海 分享 网址

setpriv使用不同的 Linux 权限设置运行程序


setpriv --help ...
$ setpriv --help

 setpriv [options] <program> [<argument>...]

Run a program with different privilege settings.

 -d, --dump                  show current state (and do not exec)
 --nnp, --no-new-privs       disallow granting new privileges
 --ambient-caps <caps,...>   set ambient capabilities
 --inh-caps <caps,...>       set inheritable capabilities
 --bounding-set <caps>       set capability bounding set
 --ruid <uid|user>           set real uid
 --euid <uid|user>           set effective uid
 --rgid <gid|user>           set real gid
 --egid <gid|group>          set effective gid
 --reuid <uid|user>          set real and effective uid
 --regid <gid|group>         set real and effective gid
 --clear-groups              clear supplementary groups
 --keep-groups               keep supplementary groups
 --init-groups               initialize supplementary groups
 --groups <group,...>        set supplementary groups by UID or name
 --securebits <bits>         set securebits
 --pdeathsig keep|clear|<signame>
                             set or clear parent death signal
 --selinux-label <label>     set SELinux label
 --apparmor-profile <pr>     set AppArmor profile
 --reset-env                 clear all environment and initialize
                               HOME, SHELL, USER, LOGNAME and PATH

 -h, --help                  display this help
 -V, --version               display version

 This tool can be dangerous.  Read the manpage, and be careful.

For more details see setpriv(1).


setpriv --reuid=1000 --regid=1000 --init-groups   <command>
setpriv --reuid=1000 --regid=1000 --clear-groups  <command>


Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数