Trying to enable TLS for maas but fails on no such fule

I am trying to setup MAAS and running this command:

root@lab-ubnt-maas-01-a:~# maas config-tls enable /tmp/lab-ubntmaas-01-a.key /tmp/lab-ubntmaas-01-a.pem

And it errors out with:

argument key: can’t open ‘/tmp/lab-ubntmaas-01-a.key’: [Errno 2] No such file or directory: ‘/tmp/lab-ubntmaas-01-a.key’

The files are definitely there and readable by anyone:

root@lab-ubnt-maas-01-a:~# ll /tmp
total 68
drwxrwxrwt 15 root root 4096 Jul 26 20:13 ./
drwxr-xr-x 19 root root 4096 Jul 26 19:02 …/
drwxrwxrwt 2 root root 4096 Jul 26 19:15 .font-unix/
drwxrwxrwt 2 root root 4096 Jul 26 19:15 .ICE-unix/
-rw-r–r-- 1 root root 1676 Jul 26 20:13 lab-ubntmaas-01-a.key
-rw-r–r-- 1 root root 1498 Jul 26 20:13 lab-ubntmaas-01-a.pem

How can I debug this?

Are you running MAAS from the snap? if so, move these files to your $HOME directory, snaps cannot access files in the host /tmp dir

yes, it is running snap. I tried it initially from /root (as I am in as root) and then /tmp. Both failed the same way.

I’d suggest to try moving cert/key into /var/snap/maas/common and try it out from there.

1 Like

@uzimmermann, did you try @troyanov 's suggestion above?

Thank you! That worked. :grinning:

1 Like

I finally got around last night to retry the certificate and yes, moving it into /var/snap/maas/common worked.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.