[SOLVED]nextcloud NAS

[SOLVED]nextcloud NAS

Postby adhemar » Dec 19th, '18, 09:30

I install successfully Nextcloud on my Linux Mageia 6 64bit pc, but when I log in to my NAS-address, the message appears:

The host name did not match any of the valid hosts for this certificate.

The option: “Trust this certificate” is checked.

The next message is then: Not Found
The requested URL/index.php/login/flow was not found on this server.
Apache/2.2.34 (Debian) Server at 192.168.2.89 Port 443

This link works correct on my Windows computer.
Thank you in advance
Last edited by adhemar on Dec 31st, '18, 08:15, edited 1 time in total.
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby morgano » Dec 19th, '18, 13:49

This is the Nextcloud *client* you mean?
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T42p T43 T60 T61 T400. Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC, CAD
morgano
 
Posts: 583
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: nextcloud NAS

Postby adhemar » Dec 19th, '18, 18:10

Apologize that I did not mention that, yes this is the client application.
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby xboxboy » Dec 20th, '18, 05:01

I've got several systems using the packaged nextcloud client, so it definitely works.

Which desktop are you using? For example I use KDE, and via Dolphin I can connect to the server via web dav, so perhaps try connecting that way to see if you can even establish a connection.

We will be able to get it working. Someone with the right knowledge will call past.
xboxboy
 
Posts: 322
Joined: Jun 2nd, '13, 06:41

Re: nextcloud NAS

Postby adhemar » Dec 20th, '18, 09:53

I use KDE desktop.
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby xboxboy » Dec 20th, '18, 11:09

Forgot to ask, can you access the nextcloud page from your web browser on the machine you wish to connect from?

Ok, I'm sure there's a way to connect via cli, but let's see if we can prove the connection using KDE's dolphin?

https://doc.owncloud.org/server/9.0/user_manual/files/access_webdav.html#accessing-files-with-kde-and-dolphin-file-manager

That's fairly old now, but should still be valid.

And actually under it, it shows the method for cli access, neat.

See if you can get it to connect doing this first.
xboxboy
 
Posts: 322
Joined: Jun 2nd, '13, 06:41

Re: nextcloud NAS

Postby adhemar » Dec 20th, '18, 16:15

I can access the NAS via the browser:
http://192.168.2.89/admin/

I try to add a new Network Folder

Name: Nextcloud
User: willy (that’s how I configured in the NAS)
Server: http://192.168.2.89/admin/
Folder: (Enter the path)

I do not know which path to enter here.
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby adhemar » Dec 21st, '18, 08:17

I mention here that I can not see the NAS in Dolphin in the Network section
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby doktor5000 » Dec 21st, '18, 14:07

You mention your PC, and also your NAS. Are those synonyms for you, or are those actually two different machines?
If the latter, could you please provide some context how and in what way you want to connect your PC (which seems to run nextcloud server) to your NAS.
´
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14921
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: nextcloud NAS

Postby adhemar » Dec 21st, '18, 17:45

Desktop PC Mageia 6 KDE 64 bit wireless to router. NAS connected to router. Laptop Windows 7 wireless to router.
The desktop pc is provided with a schitch to 2 different hard drives. The first one is also with Windows 7 and the second one with Mageia. With Windows 7 in use, no problems with Nextcloud.
In Dolphin, I can't see the NAS device.
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby xboxboy » Dec 22nd, '18, 00:56

With dolphin IIRC you use for the 'server' field the IP of the Nextcloud box, so something like 168.1.1.25

Then in the path box you use the details from your nextcloud instance: So you need to log into the web page, then on the left, click settings, and it will show you a path under WEBDAV, that will be something like
Code: Select all
https://168.1.1.25/owncloud/remote.php/webdav/


And I think you remove the "https://168.1.1.25" part.

Been a while since I set mine up, and I just attempted to retry, but it wont re-run over the top of my existing connection. Just have a play with it, did you try connecting directly but typing the webdav address into the address bar?
xboxboy
 
Posts: 322
Joined: Jun 2nd, '13, 06:41

Re: nextcloud NAS

Postby adhemar » Dec 22nd, '18, 15:59

When a go to the Networkassistent and put in:

http://192.168.2.89/Nextcloud/Archief

Not possible to connect with the Server.

It's strange I see not the nas in the Network map of Dolphin.
The language of the operatingsystem is set to Dutch. Maybe I should change this to the English language.
Last edited by doktor5000 on Dec 24th, '18, 18:26, edited 1 time in total.
Reason: fixed url tags
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby jiml8 » Dec 24th, '18, 10:52

If you want to see your NAS in Dolphin, you will have to mount your Nextcloud instance in Webdav on your mageia system.

Here is the command I use to mount mine; what needs to be changed for you should be obvious:
Code: Select all
#! /bin/bash
sudo mount -t davfs2 https://192.168.0.27:12080/nextcloud/remote.php/webdav/ /home/jiml/owncloud -o rw,uid=jiml,gid=jiml


You will get prompted for username and password unless you preconfigure them in /etc/davfs2/secrets.

To make your nextcloud client work, you have to properly connect with your Nextcloud instance. Start the client, click on "Account", select "Add New" and follow the wizard. Your nextcloud address should be the IP address of your box, with /nextcloud appended. This, at least, is the default and correct installation. Thus, my nextcloud client connects with https://192.168.0.27:12080/nextcloud . Put your username and password in, and you should be good to go.
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby adhemar » Dec 24th, '18, 18:16

I add a Network Folder

Name: Nextcloud
User: willy (that’s how I configured in the NAS)
Server: http://192.168.2.89/Nextcloud
Port: 80
Folder: Nextcloud

The result is: Unable to connect to server.
Standard the port 80 is used, is this correct?
Attachments
AddNetwork.png
AddNetwork.png (94.62 KiB) Viewed 753 times
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby doktor5000 » Dec 24th, '18, 18:30

adhemar wrote:I add a Network Folder

When adding a network folder, isn't the first step of the dialog to select the type of the network folder, where you can select WebDAV, FTP, Microsoft Windows network drive (CIFS/SMB), Secure Shell (ssh) ... ?
Cf. the first image: https://docs.kde.org/trunk5/en/kde-work ... ttach.html
What did you select there?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14921
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: nextcloud NAS

Postby jiml8 » Dec 24th, '18, 19:04

You are trying to use https on port 80, which is the http port.

Either configure your Nextcloud instance to connect on port 80 (not recommended) or click on the "Use encryption" button when you create the network folder (which will cause it to use port 443, which is what you want).

Also, I believe that you should not be putting the https:// in the line for server address since that isn't part of the server address, but specifies the protocol to use. I am not sure of this though because I have never set up webdav that way.
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby jiml8 » Dec 24th, '18, 19:21

Actually, I just experimented with this add network folder thing to connect to my nextcloud instance on my NAS, and I got the same result OP is reporting.

After Dolphin failed to connect, I got a notification that just gave the address of my nextcloud instance, with a button marked "open". So I tried to open it, and got this message:
Code: Select all
The file or folder webdavs://192.168.2.27:12080/nextcloud/ does not exist.


This pretty much has to be a problem with how the indicated protocol webdavs is handled by dolphin; the actual address sent over the LAN should start with https.

So it looks to me like a bug.

To the OP: If you open a shell window and connect like I showed in a previous post, it will work without incident. Based upon what you have posted, I believe the command line you want is this:
Code: Select all
sudo mount -t davfs2 https://192.168.2.89/nextcloud/remote.php/webdav/ /home/willy/nextcloud -o rw,uid=willy,gid=willy


This will mount your nextcloud instance at /home/willy/nextcloud, which is a folder that you must create.

When you do this you will be prompted for your root password, then for your nextcloud username and password. Then it will connect.

I, personally have placed a script in my bin directory that I use to mount my nextcloud instance; I do not do it automatically at boot (and you should not either).
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby adhemar » Dec 25th, '18, 11:26

My operating system does not know davfs2.

Code: Select all
can't find davfs2 in /etc/fstab


User Mageia = adhemar
User Nextcloud = willy

Map in Mageia: /home/adhemar/Nextcloud/
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby jiml8 » Dec 25th, '18, 18:57

And that message would indicate that you did not enter the command properly.

To get help, copy/paste the command you enter along with the response you receive. You likely did not put the "-t" in the command line, but since I don't see it I can't tell for certain.
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby adhemar » Dec 26th, '18, 15:27

I try several times also with shorter commands but "unknown filesystem type 'davfs2'" keeps appearing.
Code: Select all
[adhemar@localhost ~]$ su
Password:
[root@localhost adhemar]# mount -t davfs2 https://192.168.2.89/Nextcloud/remote.php/webdav/ /home/adhemar/Nextcloud -o rw,uid=willy,gid=willy
mount: unknown filesystem type 'davfs2'
[root@localhost adhemar]#

Mageia 6 KDE 64 bit
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby jiml8 » Dec 26th, '18, 18:30

Then install it, using either drakconf or urpmi.
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby adhemar » Dec 27th, '18, 11:15

I install davfs2
Result:
Code: Select all
[root@localhost adhemar]# mount -t davfs2 https://192.168.2.89/Nextcloud/remote.php/webdav/ /home/adhemar/Nextcloud -o rw,uid=willy,gid=willy
Please enter the username to authenticate with server
https://192.168.2.89/Nextcloud/remote.php/webdav/ or hit enter for none.
  Username: willy
Please enter the password to authenticate user willy with server
https://192.168.2.89/Nextcloud/remote.php/webdav/ or hit enter for none.
  Password: 
/sbin/mount.davfs2: the server certificate does not match the server name
/sbin/mount.davfs2: the server certificate is not trusted
  issuer:      US
  subject:     US
  identity:    nas-35-AE-07.local
  fingerprint: 04:ac:a9:78:2a:6f:ea:49:71:f9:46:2a:69:ec:5c:78:f3:4a:a7:47
You only should accept this certificate, if you can
verify the fingerprint! The server might be faked
or there might be a man-in-the-middle-attack.
Accept certificate for this session? [y,N] y
/sbin/mount.davfs2: mounting failed; the server does not support WebDAV
[root@localhost adhemar]#
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby jiml8 » Dec 27th, '18, 18:50

Shrug. It is telling you that your server is not properly configured. You have not specified what that server is, and you have not specified what webserver it uses.

If your NAS is a synology or a qnap or some such, there will undoubtedly be instructions on how to configure webdav on it. I know how to configure my server, but I have no idea how to configure yours.
jiml8
 
Posts: 1023
Joined: Jul 7th, '13, 18:09

Re: nextcloud NAS

Postby adhemar » Dec 28th, '18, 11:47

In the NAS (Netgear RN102), I change the Settings in the file Nextcloud.

Network Access: SMB
File Access Everyone: read/write

In the konsole I still have the same message.

When I login to Nextcloud, I have next message:
I do not know how to change 0770
Attachments
permissions.png
permissions.png (64.88 KiB) Viewed 633 times
User avatar
adhemar
 
Posts: 38
Joined: Mar 1st, '15, 17:43
Location: Roeselare Belgium

Re: nextcloud NAS

Postby doktor5000 » Dec 28th, '18, 17:38

You cannot mount a NAS which only provides an SMB/CIFS share as WebDAV, those are different protocols.

And regarding disabling read access for other users, you already answered this yourself:

adhemar wrote:Network Access: SMB
File Access Everyone: read/write
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14921
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Next

Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron