I'm using PHP 5.3.
Using getfacl the files permissions are:
user::rwx
group::r-x
other::r-x
I also am having problems using PHP's Program execution Functions, http://www.php.net/manual/en/ref.exec.php
The program in question is wkhtmltopdf and I have it in my /usr/bin directory.
I have the convert program in my /usr/bin directory with the exact same permissions and the is_executable function returns true.
For me the answer was to create a policy module to allow wkhtmltopdf to run without disabling SELinux:
sudo su - (run as root to make the next steps simpler)tail -F /var/log/audit.log | grep wkhtml > wkhtml.audit (leave
this running and continue to next step)cat wkhtml.audit | audit2allow -m
wkhtmltopdf > wkhtmltopdf.tecat wkhtml.audit | audit2allow -M
wkhtmltopdfsemodule -i wkhtmltopdf.pp (might take a minute,
be patient)You should now be able to load the pdf-creating page without error. If not, we have likely fixed one problem and arrived at another--might need to repeat steps. Tail to wkhtml.audit2 this time and cat it with the original when making a new module (or else you'll be undoing first fix!):
tail -F ... > wkhtml.audit2
if audit2 is empty, there is a non-selinux problem. otherwise:
cat wkhtml.audit wkhtml.audit2 | audit2allow ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With