use POSIX;
POSIX::setgid ((getgrnam ("www-data"))[2]);
POSIX::setuid ((getpwnam ("www-data"))[2]);
if ($> == 0)
{
print STDERR "$0 must not be launched as root since local cache can be corrupted\n";
print STDERR "Continue (y/N)? ";
my $res = <STDIN>;
exit 1 unless ($res =~ /^y/i);
}
lemonldap-ng-cli should give up root privileges :
It should be added in
bin/lemonldap-ng-cli