I am trying to use sed to overwrite my index.php file, but I am getting an error:
$ sed -i \'s@@
check for the /tmp folder permission
It should have the following permission
drwxrwxrwt 7 root root 4.0K Nov 16 15:06 tmp
If it is not ok for you then run the following commands
sudo chown root:root /tmp
sudo chmod 1777 /tmp
once this is done, then put a sudo infront of your sed command to execute the command as a root user.
This will solve the issue