NMap cannot open a raw socket despite being root
If you are seeing this error:
1~# nmap -Pn www.example.org
2Starting Nmap 7.80 ( https://nmap.org ) at 2020-09-04 20:59 UTC
3Couldn't open a raw socket. Error: Permission denied (13)
Most probably, installation was through Ubuntu's snap as follows:
1~# snap install nmap
2nmap 7.80 from Maximiliano Bertacchini (maxiberta) installed
Solution is to run below command
1# snap connect nmap:network-control
And re-run nmap command earlier.