本文介绍了执行 wkhtmltopdf-amd64 时的 Linux 权限问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行可执行文件wkhtmltopdf-amd64"(来自 Linux)时,我得到以下输出:

When I run the executable "wkhtmltopdf-amd64" (from Linux), I get the following output:

QPainter::begin(): Returned false============================] 100%
Error: Unable to write to destination
Exit with code 1 due to http error: 403 Forbidden

我在其他论坛看到这是由于缺乏写入临时文件的权限.我需要将哪个目录设为可写才能允许wkhtmltopdf-amd64"创建临时文件?

I have seen in other forums that this is due to lack of permissions to write the temporary file. Which directory do I need to make writable in order to allow "wkhtmltopdf-amd64" to create the temporary file?

推荐答案

确保您有权访问该目录,即:您是所有者并具有写入权限当您运行 wkhtmltopdf http://www.google.com test.pdf

make sure you have access to the directory ie : you are the owner and have write permissionswhen you run wkhtmltopdf http://www.google.com test.pdf

你总是可以 su sudo 并尝试一下,但通常我不会写信给家里以外的任何地方,这样我就不会在重要的地方存放垃圾.

you can always su sudo and try it out but generally i wouldn't write to any where but home just so i dont store junk in important places.

这篇关于执行 wkhtmltopdf-amd64 时的 Linux 权限问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 19:10