当前位置: 首页 > 工具软件 > apparmor > 使用案例 >

apparmor命令总结

魏君博
2023-12-01

@TAOC

apparmor命令总结

安装相关工具

sudo apt-get install apparmor-utils

启动、停用、重启apparmor

启用:
/etc/init.d/apparmor start
停用:
/etc/init.d/apparmor stop
重启:
/etc/init.d/apparmor restart

为指定的程序创建一个配置文件:

sudo aa-genprof [filename]

显示当前AppArmor策略加载信息:

aa-status

将处于AppArmor安全配置文件设置为enforce模式:

sudo aa-enforce [excutable] [excutable]…][-d/path/to/profiles]

将处于AppArmor安全配置文件设置为complain模式:

sudo aa-complain [excutable] [excutable]…][-d/path/to/profiles]

使一个AppArmor安全配置文件无效:

sudo aa-disable [excutable] [excutable]…][-d/path/to/profiles]

使用工具aa-genprof生成AppArmor配置文件:

aa-genprof [executable] [-d/path/to/profiles][-f/path/to/logfile]

 类似资料: