title: sed permission denied when overwriting file
body: <p>I am trying to use sed to overwrite my index.php file, but I am getting an error:</p>
  
  <pre><code>$ sed -i 's@&lt;head&gt;@&lt;head&gt;&lt;script type="text/javascript" src="new.js"&gt;&lt;/script&gt;@' index.php
  sed: couldn't open temporary file ./sedmZNx8T: Permission denied
  </code></pre>
  
  <p>Does anyone know how to fix this?</p>