【发布时间】:2023-03-07 12:22:01
【问题描述】:
当我运行 rustup doc --book 时,我得到了这个:
Access to the file was denied.
The file at file:///home/ken/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html is not readable. It may have been removed, moved or file permissions may be preventing access.
我已经重新安装,我已经尝试在目录上使用chmod -R 777。还有什么可以尝试的?文件在那里。
【问题讨论】:
-
使用
getfacl检查文件和所有父文件夹。检查xdg-open file:///home/ken/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html是否有效。 -
xdg_open 在浏览器中导致相同的访问被拒绝。 getfacl 输出表明文件夹归我的用户所有,我的用户名在“组”和所有者下。
-
您可以尝试
xdg-open与您系统上的其他HTML 文件吗?你能试试xdg-mime query default text/html吗? -
默认是 firefox,xdg-open 可以与其他 HTML 文件配合使用
-
我有点迷路了。最后一个主意,你能试试
xdg-mime query filetype index.html和xdg-mime query default $(xdg-mime query filetype index.html)吗?