我写了一个小 bash 脚本来测试 suid 权限
$ cat phone.sh
#!/bin/sh
echo "abc" >> out.txt
$ ls -l out.txt phone.sh
-rw-r--r-- root wzj ... out.txt
-rwsr-xr-x root wzj ... phone.sh
$ ./phone.sh
./phone.sh: 2: cannot create out.txt: Permission denied
为什么?我以为我已经设置了suid权限,所以我可以以root权限运行phone.sh来修改out.txt文件,但我失败了。谁能告诉我我哪里做错了?