title: run bash script with suid set on file
body: <p>I wrote a small bash script to test suid permission  </p>
  
  <pre><code>$ cat phone.sh
  #!/bin/sh
  echo "abc" &gt;&gt; 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
  </code></pre>
  
  <p>why? I thought I already set the suid permission , so i can run the phone.sh with root privilege to modify the out.txt file , but i just failed. Can anybody tell me where i did wrong please?</p>