5
在Linux中阻止特定用户的特定命令
如何阻止命令,让mkdir特定用户说呢? 我刚刚创建的只读功能并将其存储在用户个人资料中 ~/.bashrc /bin/mkdir() { echo "mkdir command not allow for you" } mkdir() { echo "mkdir command not allow for you" } ./mkdir() { echo "mkdir command not allow for you" } readonly -f /bin/mkdir readonly -f mkdir readonly -f ./mkdir 测试: rahul@ubuntu:~$ cd /bin/ rahul@ubuntu:/bin$ ./mkdir /home/rahul/ggg mkdir …