I have lam 5.6 installed on a Centos 7.2 machine. The basic ldap management is
working ok. I'm having problems with lamdaemon.
First of all the test (lam/templates/tests/lamdaemonTest.php) just dies.
Second, I'm attempting to use the ssh configuration with public/private keys
(yes, the basic ssh configuration does work).
At the moment I'm uncertain which key it's looking for, so I'm going to guess
the private key id_rsa.
Lamdaemon, or more precisely /usr/share/ldap-account-manager/lib/lamdaemon.inc,
can't find the file (actually /home/oper/.ssh/id_rsa)
In fact the php configuration can't seem to find a file anywhere outside the
/var/www/html directory, although it claims that it can't read it there.
I've been trying with a simple script
<?php
$filename = 'id_rsa';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
echo "<br>";
if (is_readable($filename)) {
echo "The file $filename is readable";
} else {
echo "The file $filename cannot be read";
}
echo "<br>";
if (!file_exists($filename) || !is_readable($filename)) {
echo "lamdaemon will not work";
}
echo "<br><br>";
if ($handle = opendir('/tmp')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "$entry<br>";
}
}
closedir($handle);
}
echo "<br><br>";
$filename = '/home/oper/.ssh/id_rsa';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
echo "<br>";
if (is_readable($filename)) {
echo "The file $filename is readable";
} else {
echo "The file $filename cannot be read";
}
echo "<br>";
if (!file_exists($filename) || !is_readable($filename)) {
echo "lamdaemon will not work";
}
?>
Crude, I know, but the script finds id_rsa in /var/www/html, can't list /tmp,
and doesn't find the file in /home/oper/.ssh.
I've also tried putting id_rsa in /tmp.
There seem to have been other problems with PHP file_exists, but no real
solution. PHP installed is php-5.4.16-36.el7_1.x86_64
I've had selinux in permissive state, but have now disabled it entirely, but no
improvement.
Obviously this is not a problem with LAM directly, but something with php and
versions. I note that safe_mode was removed in 5.4 which may have some bearing.
Any ideas?
Carl Wilson
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Lam-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lam-public