Ldap support with NC Snap

Hi
Following a corrupt Owncloud database this morning I have decided to bite the bullet and install NextCloud with a view to importing my existing file data.
Installed latest NC snap on Ubuntu Server Xenial which was a breeze!
Just tried to enable LDAP support but it reports "The library ldap is not available."
I have installed ldap-utils and php-ldap, rebooted, but still get the same "The library ldap is not available."
Does the Snap have to be built with LDAP support or should installing LDAP support on the ‘host’ machine work for the Snap?

Thanks for any suggestions.

The Snap has to include that. That said, I’ve never used Snappy myself :wink:

It needs to be provided by the Snap. The best thing to do would be to file a request with the developer of the Snap you’re using.

Thanks both for youth prompt replies.
Oparoz I thought I was using an official nextcloud snap as I followed what I thought was a next cloud tutorial. Perhaps not.
Before I ditch the idea of using a snap, can either of you confirm if the snap would be able to see my separate owncloud data which is on its own disk array if I mount that to the base OS? If that is a non starter I won’t waste any more time with the snap.

Cheers

I believe it’s currently the only Nextcloud Snap available in the snap store, but it’s built by a 3rd party to scratch an itch, not by the Nextcloud community or company, although some of the features came from some of us.
Very few people who know how to write snaps also have the time to build and maintain an official snap, so we’ll just have to be patient.

It won’t be able to see it. The snap creates it own chroot and can’t access anything placed outside.
You could try to connect to it via SMB once the snap supports it or SFTP, which seems to work already.

I wonder if we would be able to mount storage from within a snap (if tools are included in a future revision) or if we would be blocked by some of the security restrictions.

Looks like the snap was developed by ‘canonical’.
I suspected as much regarding the disk mount. Although the snap was a pleasure to install, I need my nextcloud server (and existing data) live by the morning so back to the traditional method.

Thanks for taking the time to reply.

Glad to hear that you got it working :slight_smile:

Yes, so we were waiting for 10.0.1 to switch to NC10 and this will happen very soon now.

Regarding LDAP, this would be a good exercise. You should try to add the extension to the PHP part.

Typically, this starts by looking at the requirements for the app to work and in this case you need php7.0-ldap

The next step is to look at the requirements for the package itself:

$ apt show php7.0-ldap
Package: php7.0-ldap
Version: 7.0.8-0ubuntu0.16.04.2
Priority: optional
Section: php
Source: php7.0
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 93.2 kB
Provides: php-ldap
Depends: php-common (>= 1:33), ucf, php7.0-common (= 7.0.8-0ubuntu0.16.04.2), libc6 (>= 2.14), libldap-2.4-2 (>= 2.4.7)
Homepage: http://www.php.net/
Supported: 5y
Download-Size: 21.1 kB
APT-Manual-Installed: yes
APT-Sources: http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
Description: LDAP module for PHP
 This package provides the LDAP module(s) for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.

N: There is 1 additional record. Please use the '-a' switch to see it

In this case, you can see that libldap-2.4-2 is required and you should add it to the list of build-packages.

Keep me posted :slight_smile:

Try “pkg install php70-ldap”