Error installing CertBot on Ubuntu 20.04

My domain is:

I ran this command:
sudo snap install --classic certbot

It produced this output (when run as root):
error: cannot perform the following tasks:

  • Run configure hook of "certbot" snap if present (run hook "configure": / not root-owned 755:33)

My web server is (include version):
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2020-08-12T19:46:17

The operating system my web server runs on is (include version):
Ubuntu 20.04

My hosting provider, if applicable, is:
N/A

I can login to a root shell on my machine (yes or no, or I don't know):
Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): Not relevant. Installation of certbot failed

Any help would be appreciated.

3 Likes

@certbot-devs A mysterious snapd error, could you please advice? Thank you.

4 Likes

snap is complaining that the permissions of the root directory / are too broad. Based on the error message, the directory is owned by uid 755 and gid 33, but should be owned by root (0 and 0).

I speculate that @Nightwielder probably accidentally applied these permissions while trying to fix permissions of their website files. gid 33 is www-data and although uid 755 doesn't exist, it is a common file mode, which suggests they ran chown with chmod arguments.

Either way, you'll want to undo this damage by resetting the ownership to the system default:

chown root:root /
chmod o-w /
7 Likes

Thank you! Works now.

2 Likes

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