Map two network drives on the same server with different credentials

0

I have a Nextcloud server in which I have a couple different users (I want to keep some files completely separate from others for personal reasons; hence the separate accounts).

I'm mounting the drives as a network drive with WebDav. I also have a DDNS subdomain with FreeDNS/Afraid.org which point to the server. I'd like to use the domain name as opposed to an IP address in case I decide to take my laptop to Starbucks or whatever.

However, when I try to map the second drive, I get yhe following error message.

The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share.

I'm connecting as per these instructions.

Here's an example of how my mappings look; the first one will work, but the second one will not.

https://mydomain.chickenkiller.com/remote.php/dav/files/user1/
https://mydomain.chickenkiller.com/remote.php/dav/files/user2/

The only thing I can think of is to make a second DDNS and map it also to my IP, but I'm afraid of messing things up with Nextcloud

audiFanatic

Posted 2019-12-14T02:30:42.423

Reputation: 320

Answers

0

Ok, I came up with my own solution. So for anybody out there struggling with something similar, here's what I did. FYI I'm using the Snap installation of Nextcloud

I first went back to FreeDNS and created another DDNS.So now I own these two addresses.

https://mydomain.chickenkiller.com
https://mydomaintwo.chickenkiller.com

I then disabled https temporarily with sudo nextcloud.disable-httpsto get rid of the old certificate.

Then I re-enabled it with sudo nextcloud.enable-https lets-encrypt

I entered Y and my email when prompted.

NOW HERE'S THE KEY:

When asked to enter your domain name, read it carefully. It says domain(s), not domain. It says to separate your domains with spaces.So if you need to map a third drive you'd create a third DDNS and so on. Wait for the certificate to generate.

Next test out your domains in the browser. If they're giving you "untrusted domain" issues, then you have to add it to the list of trusted domains, which can be found in /var/www/nextcloud/config/config.php

audiFanatic

Posted 2019-12-14T02:30:42.423

Reputation: 320