脚本宝典收集整理的这篇文章主要介绍了php – Libreoffice源代码未找到aws linux,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_403_1@我试过给libreoffice和执行命令但没有成功的包提供root权限.
@H_403_1@这是我使用https://github.com/szonov/libreoffice-converter的包@H_403_1@我正在使用laravel 5.4.这是执行操作的包中的代码
$replacement = array( 'bin' => $this->bin,'convert_to' => $convert_to,'outdir' => $outdir,'source' => $this->source ); $cmd = $this->makeCommand($replacement); $cmd = "sudo ".$cmd; shell_exec($cmd); $result = false; if (file_exists($outfile)) { $this->mkdir(dirname($this->destination)); $result = rename($outfile,$this->destination); } // remove temporary sub directory rmdir($outdir); return $result;@H_403_1@我尝试追加sudo,因为当我执行命令并执行使用sudo时,它在命令行中工作.
sudo usermod -s /bin/bash www-data@H_403_1@然后,您应该使用该用户登录并修复所有权限问题,以便您可以运行该命令
sudo su www-data@H_403_1@完成此操作后,请务必使用以下内容重置登录信息
sudo usermod -s /bin/nologin www-data@H_403_1@一旦问题在用户终端中解决,您也可以在apache中运行命令而不会出现问题
以上是脚本宝典为你收集整理的php – Libreoffice源代码未找到aws linux全部内容,希望文章能够帮你解决php – Libreoffice源代码未找到aws linux所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。