Linux – Wget error bash Windows Subsystem for Linux

bashlinuxUbuntuwgetwindows-subsystem-for-linux

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:

  1. Disable HSTS on each call using the wget option --no-hsts
  2. Try to create a file in /home/atul/.wget-hsts with the appropriate permissions and try if wget makes use of this file
  3. Just ignore this warning