nextcloud snap fails to enable https

Bug #1881189 reported by Panagiotis
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Medium
Unassigned

Bug Description

his is what I get from the terminal:

panagiotis@pop-os:~$ sudo nextcloud.enable-https lets-encrypt
[sudo] password for panagiotis:
In order for Let's Encrypt to verify that you actually own the
domain(s) for which you're requesting a certificate, there are a
number of requirements of which you need to be aware:

    In order to register with the Let's Encrypt ACME server, you must
    agree to the currently-in-effect Subscriber Agreement located
    here:

    https://letsencrypt.org/repository/

    By continuing to use this tool you agree to these terms. Please
    cancel now if otherwise.

    You must have the domain name(s) for which you want certificates
    pointing at the external IP address of this machine.

    Both ports 80 and 443 on the external IP address of this machine
    must point to this machine (e.g. port forwarding might need to be
    setup on your router).

Have you met these requirements? (y/n) y
Please enter an email address (for urgent notices or key recovery): ******@****.com
Please enter your domain name(s) (space-separated): *********.ddns.net
Attempting to obtain certificates... error running certbot:

An unexpected error occurred:
IOError: [Errno 13] Permission denied: '/etc/os-release'
Please see the logfile '/tmp/tmpki87mT' for more details.

When I try: $ sudo snap run --shell nextcloud.enable-https -c 'cat /etc/os-release'
I get: cat: /etc/os-release: Permission denied

When I try:
ls -ld /etc/os-release
I get: rwxrwxrwx 1 root root 17 Μαΐ 15 02:38 /etc/os-release -> pop-os/os-release

When I try: cat /etc/pop-os/os-release
I get: NAME="Pop!_OS" VERSION="20.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 20.04 LTS" VERSION_ID="20.04" HOME_URL="https://system76.com/pop" SUPPORT_URL="http://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal LOGO=distributor-logo-pop-os

description: updated
Revision history for this message
Samuele Pedroni (pedronis) wrote :

It seems host os-release is implicitly expected to point to /usr/lib and then it presents what is contained in the base snap. This is obviously fragile, not sure how many systems violate this assumption.

Changed in snapd:
status: New → Confirmed
importance: Undecided → Medium
Changed in snapd:
assignee: nobody → Samuele Pedroni (pedronis)
Revision history for this message
Nuno Santos (nunosantos2000) wrote :

Hi,

Any news?

Regards.

Changed in snapd:
assignee: Samuele Pedroni (pedronis) → nobody
Revision history for this message
nicocesar (nicocesar) wrote :

Also affects freecad-realthunder snap

People are recommending to do sudo snap install freecad-realthunder --devmode --channel=latest/edge

( See https://forum.freecad.org/viewtopic.php?t=74461 )

but devmode isn't safe and allows to do many other things.

Is there an easy fix for this?

Revision history for this message
Nuno Santos (nunosantos2000) wrote :

Hi ppl,

Any news?

This solution ispossivel to revert?

The solution posted at the bottom of the link above:

sudo ln -f /etc/os-release /etc/pop-os/os-release
sudo mkdir -p /var/snap/nextcloud/current/certs/certbot
sudo nextcloud.enable-https lets-encrypt

solves the https problem, but then when I type supo apt update, I get the following warning:

** (appstreamcli:1227999): WARNING **: 14:09:59.028: Unable to read /etc/os-release file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.