You are editing the hosts (or services file) and trying to save the file. Unfortunately, you are getting permission denied error while saving the hosts (or services file).
You don’t have permission to save in this location. Contact the administrator to obtain permission.
1. Open a new notepad by right clicking on it and select Run as Administrator. *Below screenshot is the example to run a program as administrator.
2. Copy all the contents from the original hosts file (please make a copy of backup first) and paste them inside the new notepad.
3. Add the new item you required inside the new notepad. Now save the hosts file in the C:\Windows\System32\drivers\etc directory, use hosts as the filename and select Save as type to All Files. Just accept Yes to replace the old hosts file.
The same step was done for services file.