Mad*_*ala 4 linux bash wget ubuntu windows-subsystem-for-linux
我在尝试使用 wget 下载时在 WSL 中遇到错误
wget -O quotefile.txt "https://www.google.com"
Run Code Online (Sandbox Code Playgroud)
输出
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]
Run Code Online (Sandbox Code Playgroud)
为什么我收到这个错误
Run Code Online (Sandbox Code Playgroud)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.
以及如何解决这个问题?
重新安装后我遇到了这个问题。之前我使用的是 Windows 10 专业版 19035,但现在我使用的是 Windows 10 专业版 1909。
小智 6
我自己刚刚遇到了这个问题,就我而言,该.wget-hsts文件是组和全局可写的。我只是将它限制为用户可写并且错误消失了:
前
-rw-rw-rw- 1 matthias matthias 165 Mar 13 13:57 .wget-hsts
Run Code Online (Sandbox Code Playgroud)
后
-rw-r--r-- 1 matthias matthias 165 Mar 13 13:57 .wget-hsts
Run Code Online (Sandbox Code Playgroud)
HSTS 是 HTTPS 之上的可选安全测量。由于 HTTPS 连接本身正常工作并且文件已下载,这似乎是一个警告而不是错误。因此我看到三个选择:
--no-hsts/home/atul/.wget-hsts,并尝试 wget 是否使用该文件| 归档时间: |
|
| 查看次数: |
5530 次 |
| 最近记录: |