/ not root-owned 1000:1000 when try to run a certbot command

when try to run a certbot command I'll get error:
/ not root-owned 1000:1000
It has worked before. And I need to refresh a certificate
My / is owned by root root as far as I can check. If I list / it shows all containing folders as root root I do not know how to check / by it self
any suggestions?

My domain is:

I ran this command:
sudo certbot

It produced this output:
/ not root-owned 1000:1000

My web server is (include version):
apache2

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

Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

My hosting provider, if applicable, is:
local server

I can login to a root shell on my machine (yes or no, or I don't know):
Yes via ssh and sudo but can plug ain a keyboard if needed

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):

remco@thuis2:~$ sudo certbot --version
/ not root-owned 1000:1000

What has changed since it last worked?

What do these show?

sudo snap list
sudo curl -I google.com

(yes, normally you don't use sudo with curl but want to see it anyway)

4 Likes

My guess is that you're running Certbot via snapd, and this is a snap message.

see:

If so, the third link suggests this may work:

chown root:root -R /var/lib/snapd/

5 Likes

Beside regular updates nothing in particular. Or at least nothing that I can recall.

Certbot is indeed a snap:
certbot 2.7.4 3462 latest/stable certbot-eff✓ classic
snapd 2.60.4 20290 latest/stable canonical✓ snapd

And what is it about the header?

HTTP/2 301
location: https://www.google.com/
content-type: text/html; charset=UTF-8
content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-xxxxxxxxxxxxxxxxxxx' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
date: Mon, 04 Dec 2023 17:09:40 GMT
expires: Mon, 04 Dec 2023 17:09:40 GMT
cache-control: private, max-age=2592000
server: gws
content-length: 220
x-xss-protection: 0
x-frame-options: SAMEORIGIN
set-cookie: CONSENT=PENDING+869; expires=Wed, 03-Dec-2025 17:09:40 GMT; path=/; domain=.google.com; Secure
p3p: CP="This is not a P3P policy! See P3P and Google's cookies - Google Account Help for more info."
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Yes I found that suggestion as well and tried to chown / as suggested

Nothing. I was just poking around with sudo. The error is o/s related

And, you tried?

sudo chown root:root /
4 Likes

I thought I did :flushed:
Doing it "again" solved my problem.
It was in the second proposed solution from jvanasco
And I visit it and tried that at least that is what I thought. Well... Thank you all

2 Likes

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