sed permission denied when overwriting file

前端 未结 9 710
我在风中等你
我在风中等你 2021-01-11 12:07

I am trying to use sed to overwrite my index.php file, but I am getting an error:

$ sed -i \'s@@

        
9条回答
  •  盖世英雄少女心
    2021-01-11 12:52

    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

提交回复
热议问题