项目重构
This commit is contained in:
33
0-部署应用/Oracle-Cloud/k3s集群/5-uninstall-k3s.sh
Normal file
33
0-部署应用/Oracle-Cloud/k3s集群/5-uninstall-k3s.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user