php permission denied on executing a C exe file
문제
Im using Fedora 14 and tried to execute a C program inside a php script using the backtick operator.
It said permission denied
, but it works for other bash commands, e.g. test.sh
; it only contains ls -lrt
.
Both test.sh
and a.out
have the permissions and both belongs to the apache users.
Note: It runs fine on the command line and I get permission denied when accessing from a browser.
해결책 2
Thanks for the answers. I fixed it by disabling SELinux.
다른 팁
You'll need to create a new file context for your executable as well as a transition that allows httpd to execute files marked with this context.
제휴하지 않습니다 StackOverflow