"snap install --classic certbot" fails on Ubuntu 18.04 virtual server

My domain is: isbd.uk

I ran this command: snap install --classic certbot

It produced this output:
error: cannot perform the following tasks:

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

My web server is (include version): apache2 2.4.29

The operating system my web server runs on is (include version): ubuntu 18.04

My hosting provider, if applicable, is: gandi

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

I don't understand this error as / is owned by root:
root@isbdGandi:/# ls -al
total 104
drwxr-xr-x 23 root mark 4096 Feb 5 14:21 .
drwxr-xr-x 23 root mark 4096 Feb 5 14:21 ..
drwxr-xr-x 2 root root 4096 Jan 27 21:37 bin
drwxr-xr-x 2 root root 4096 Jul 3 2017 boot
drwxr-xr-x 11 root root 3620 Feb 5 14:08 dev
drwxr-xr-x 97 root root 12288 Feb 5 14:09 etc
drwx------ 2 root root 4096 Dec 15 2017 gandi
drwxr-xr-x 7 root root 4096 Feb 10 2019 home
drwxr-xr-x 12 root root 4096 Feb 5 14:08 lib
drwxr-xr-x 2 root root 4096 Dec 16 11:12 lib64
drwx------ 2 root root 16384 Feb 25 2014 lost+found
drwxr-xr-x 2 root root 4096 Feb 25 2014 media
drwxr-xr-x 2 root root 4096 Apr 19 2018 mnt
drwxr-xr-x 2 root root 4096 Feb 5 14:05 opt
dr-xr-xr-x 167 root root 0 Nov 11 23:30 proc
drwxr-x--- 17 root root 4096 Feb 5 14:12 root
drwxr-xr-x 18 root root 620 Feb 5 14:08 run
drwxr-xr-x 2 root root 12288 Feb 5 14:08 sbin
drwxr-xr-x 5 root root 4096 Feb 5 14:22 snap
lrwxrwxrwx 1 root root 13 Oct 31 2018 srv -> /var/www/html
dr-xr-xr-x 13 root root 0 Nov 11 23:30 sys
drwxrwxrwt 11 root root 4096 Feb 5 14:27 tmp
drwxr-xr-x 10 root root 4096 Feb 25 2014 usr
drwxr-xr-x 14 root root 4096 Feb 5 14:08 var
root@isbdGandi:/#

What should I do now?

1 Like

Aaargh!! I should have searched harder, sorry everyone. It's those group values against . and .. caused the problem.

chown root:root .

and it's fixed.

Sorry for the noise.

3 Likes

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