2

On my web server, I changed the chroot to only have access to the root of my website's home directory as opposed to the rest of the file system, for security purposes. However, I've noticed that since the change I can't seem to get OpenSSL to be recognized within PHP. Trying to send mail from my server, I get the following error:

Warning: stream_socket_enable_crypto(): SSL: Success in /public/lib/mailer/class.smtp.php on line 274 2014-05-04 23:32:29 CLIENT -> SERVER: QUIT 2014-05-04 23:32:29 SERVER -> CLIENT: 2014-05-04 23:32:29 SMTP ERROR: QUIT command failed: SMTP connect() failed 

What OpenSSL files do I need to include in the chroot in order to make the script run? Is there any other way I can have PHP access OpenSSL without changing my chroot? Any help would be appreciated. Thanks.

1 Answer 1

0

i bind-mounted /etc/ssl, /etc/pki/ca-trust, /etc/pki/tls, into [CHROOT] folder and it worked (for CentOS 7, Rocky 8). e.g.: mkdir -p [CHROOT]/etc/pki/tls mount --bind -o ro /etc/pki/tls [CHROOT]/etc/pki/tls

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.