> On Oct 26, 2021, at 9:22 AM, Sven F. <sven.falem...@gmail.com> wrote:
> 
> }{ello,
> 
> I updated a device and use php fpm on openbsd 7.0
> everything works fine after putting a resolv file in the chroot
> but i can't send email from the chroot
> 
> I hope I didn't see something obvious.
> 
> to troubleshoot i drop the ksh inside the chroot
> 
> /var/www/usr/sbin/ksh:
>        Start            End              Type  Open Ref GrpRef Name
>        00000e4fc4d74000 00000e4fc4e1a000 dlib  1    0   0
> /var/www/usr/sbin/ksh
> 
> and wrote a stupid php
> 
> <?php
> $output=null;
> $retval=null;
> # exec('/usr/sbin/sendmail -h  2>&1', $output, $retval);
> exec ('/usr/sbin/ksh -c "echo a"', $output, $retval);
> echo '<br/>';
> echo "Returned with status $retval and output:\n";
> echo '<br/>';
> $rc = sprintf('%o', fileperms('/usr/sbin/sendmail'));
> echo $rc;
> echo '<br/>';
> $rc = sprintf('ffoo: %o', fileperms('/usr/sbin/ffoo'));
> echo $rc;
> echo '<br/>';
> print_r(array('o' => $output,'perm' => $rc, 'r' => $retval));
> 
> which output :
> 
> Returned with status 127 and output:
> 100555
> ffoo: 100644
> Array ( [o] => Array ( ) [perm] => ffoo: 100644 [r] => 127 )
> 

Does /bin/sh exist in the chroot?  It’s needed by exec.

Reply via email to