I just started learning PHP. When configuring the site domain name, I opened the hosts file. After binding 127.0.0.1 to the domain name, I saved the hosts file. It always pops up and saves it in another place. This fails. How to solve it?
First open the file where the file is located, the path is: c:windowssystem32driversetc
Then we right-click on the file and select the properties option
Then in the properties window that opens, we switch to the Security tab
Then we select the Advanced button of the Security tab:
In the new window that opens, we select the button to change permissions
Then in the new window that opens, remove the permissions included from the parent of this object item inherited permissions, and then click the Add button
After clicking the Add button, we return to the window, click the OK button, the windows security window pops up, we click the Yes button
Then we Click the OK button again, return to the initial properties window, then select all the administrator groups of our current user, and press the edit button
In the pop-up window, we check the management group where the current user is located, Give full control permission
After the modification is completed, click the OK button, and then click the OK button again, so that you can modify the Hosts file.
It may be a problem with C drive permissions. You can save it to the desktop first, and then copy and replace it to the host file corresponding to C:WindowsSystem32driversetc.
When opening hosts under windows, right-click and open as "Administrator" and then save.
Under hosts under linux, you can use root or sudo to open and save.
First open the file where the file is located, the path is: c:windowssystem32driversetc
Then we right-click on the file and select the properties option
Then in the properties window that opens, we switch to the Security tab
Then we select the Advanced button of the Security tab:
In the new window that opens, we select the button to change permissions
Then in the new window that opens, remove the permissions included from the parent of this object item inherited permissions, and then click the Add button
After clicking the Add button, we return to the window, click the OK button, the windows security window pops up, we click the Yes button
Then we Click the OK button again, return to the initial properties window, then select all the administrator groups of our current user, and press the edit button
In the pop-up window, we check the management group where the current user is located, Give full control permission
After the modification is completed, click the OK button, and then click the OK button again, so that you can modify the Hosts file.
It may be a problem with C drive permissions. You can save it to the desktop first, and then copy and replace it to the host file corresponding to C:WindowsSystem32driversetc.