为什么它在运行 shell 脚本时拒绝授予权限


Why it is giving permission denied while running a shell script?

执行后

frama-c -pdg -dot-pdg graph -pdg-print test.c

在通过 PHP shell_script文件中。我在直接执行上述命令时获得输出作为 graph.main.dot 的权限被拒绝,我得到了正确的输出。

因为当你运行它时,你从你的用户帐户运行它,当PHP运行它时,它是从Web服务器帐户运行它。

您有权访问graph.main.dot但 Web 服务器没有。

您可以使用 chmodchgrp 命令更改权限。