Files
2024-11-28 16:42:36 +08:00

34 lines
787 B
Bash

#!/usr/bin/env bash
/usr/local/bin/k3s-uninstall.sh
/usr/local/bin/k3s-agent-uninstall.sh
rm -rf /root/k3s-install/
# 添加执行权限 不能执行上面的命令
apt install acl
chmod 440 /usr/local/bin/k3s-uninstall.sh
bin/setfacl -m u:root:--- /usr/local/bin/k3s-uninstall.sh
bin/setfacl -m g:root:--- /usr/local/bin/k3s-uninstall.sh
getfacl /usr/local/bin/k3s-uninstall.sh
# 显示如下
#getfacl: Removing leading '/' from absolute path names
## file: usr/local/bin/k3s-uninstall.sh
## owner: root
## group: root
#user::r--
#user:root:---
#group::r-x #effective:---
#group:root:---
#mask::---
#other::---
# 执行 显示无权限
⚡ root@arm-seoul-1  ~  /usr/local/bin/k3s-uninstall.sh
zsh: permission denied: /usr/local/bin/k3s-uninstall.sh