I'm getting an error in WSL while trying to download using wget
wget -O quotefile.txt "https://www.google.com"
Output
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/atul/.wget-hsts'. HSTS will be disabled.
--2020-04-08 12:47:43-- https://www.google.com/
Resolving www.google.com (www.google.com)... 2404:6800:4002:80f::2004, 172.217.166.196
Connecting to www.google.com (www.google.com)|2404:6800:4002:80f::2004|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘quotefile.txt’
quotefile.txt [ <=> ] 14.68K --.-KB/s in 0.002s
2020-04-08 12:47:45 (6.43 MB/s) - ‘quotefile.txt’ saved [15029]
Why i am getting this error
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file. ERROR: could not open HSTS store at '/home/atul/.wget-hsts'. HSTS will be disabled.
and how to solve this ?
I am facing this problem after fresh reinstall.Earlier I was using Windows 10 Pro Version 19035
but right now i am using Windows 10 Pro Version 1909.
Best Answer
HSTS is an optional security measurement on top on HTTPS. As the HTTPS connection itself works and the file has been downloaded this seems to be rather a warning than an error. Therefore I see three options:
--no-hsts
/home/atul/.wget-hsts
with the appropriate permissions and try if wget makes use of this file