Fresh install on a mini-PC: how to manage access rights in Ubuntu?

Alright, I’m diving in — I’m migrating my Gladys from an rPi4 to a mini-PC. But I’m stuck on something I don’t understand at all: the file access permissions managed by Ubuntu. I need help to get started…

The mini-PC is an INTEL NUC 3700 with 8 GB of RAM and a 128 GB SSD. I installed a brand-new Ubuntu Server 24.04 (checking the option to have Docker installed at the same time), and I connect via SSH (with the user I configured during the Ubuntu Server install) without issue from another computer, ready to install Gladys as explained on Installation avec Docker | Gladys Assistant

But when I tried to run « docker run […] gladysassistant/gladys:v4 » (I’m not copying the entire command, it’s the one from Gladys’ docs page…), I got the following error :

docker: permission denied while trying to connect to the Docker daemon socket at                                                                            unix:///var/run/docker.sock: Post \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/cont                                                                           ainers/create?name=gladys\": dial unix /var/run/docker.sock: connect: permission                                                                            denied.

And when I add ‹ sudo › before the command, the downloads proceed but I then get the error

docker: Error response from daemon: error while creating mount source path '/var/lib/gladysassistant': mkdir /var/lib/gladysassistant: read-only file system.

Ideally, I’d like two things from anyone who can help me:

  • to know how to resolve the situation
  • to have an explanation of the permission logic in Ubuntu, because I don’t understand why the user I create during the Ubuntu installation isn’t « all-powerful » :wink: But well, this second point may not be explainable in a few lines :stuck_out_tongue_winking_eye:

Thanks in advance for your help!

Regarding the first point, I think you can do this:

Add your user to the Docker group:

sudo usermod -aG docker $USER

Then

sudo chmod 755 /var/lib/gladysassistant
sudo chown $USER:$USER /var/lib/gladysassistant

You should now have permissions on the directory :+1:

As for explanations… I can’t give you any LOL :joy:

Thanks @guim31.

But the first command you gave me (usermod…) returns this error:
usermod: group 'docker' does not exist

Should there be a docker group?

:stuck_out_tongue_winking_eye:

Could installing Docker by checking the option during the Ubuntu Server installation have been a bad idea? Since I’m only at the beginning of my operations, I can redo the Ubuntu installation and install Docker afterwards (as indicated on the Gladys documentation page…)

I’ll admit I’ve always installed Docker by hand… So I don’t know how it works during an automated installation.

Maybe this page can help you Post-installation steps | Docker Docs

1 Like

Ah oui en effet il est noté dans cette doc de créer soi même le groupe docker :

To create the docker group and add your user:

  1. Create the docker group.
$ sudo groupadd docker
  1. Add your user to the docker group.
$ sudo usermod -aG docker $USER
  1. Log out and log back in so that your group membership is re-evaluated.

Thanks @cicoub13 and @guim31 for your advice.
Creating the docker group did indeed solve the issue of being able to run docker commands without ‹ sudo ›. But I still had the ‹ read-only file system › error.

I looked into it a bit, but it annoyed me, I admit :wink: So I reinstalled Ubuntu Server without docker, then installed docker using the instructions in the Gladys docs. And it works without any issue, Gladys is fully operational.

Okay, restoring GladysPlus now…

4 Likes

@StephaneB Congrats on migrating to a mini‑PC, it’s going to change your life :smiley:

Good that you found a solution — indeed, generally installing Docker via the Ubuntu packages is rarely a good idea; the packages are often old versions!

1 Like

Good evening
I’m trying on the Beelink mini PC; after fixing the network connection problem, I find myself in the same situation as @StephaneB
I installed Ubuntu 24.04 server, then I followed @pierre-gilles’ tutorial and I’m stuck: when I run docker ps, I get a permission denied — to what? I don’t know :sob:
here is the response to the command


gladys@gladyserver://$ docker ps
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.47/containers/json": dial unix /var/run/docker.sock: connect: permission denied. Comment puis je me sortir de ça.? faut il vraiment créer un groupe docker?
merci d'avance

I’m replying to myself, I’m a bit lazy — I ask first and search later? Oh well. So I solved my problem. I added the command

sudo usermod -aG docker pi

replacing pi with my username on the Beelink, restart Pu

@Psoy I think you missed a part of the training :smiley: From minute 5:00 to 6:00 of « Installation of Gladys » :slight_smile:

Hello @pierre-gilles
I did, however, follow

Good evening everyone
I’m posting here because this concerns the installation of my mini PC, to

This command updates your system. So if you want an up-to-date system, run this command.
And make sure to run it regularly!

1 Like

It depends what their goal is! If their goal is stability, I don’t recommend doing it regularly, especially since @Psoy is rather a novice.

Security updates are automatic on Ubuntu, so there is no need to run this command for security reasons.

When you update all the packages on your system, you risk

I confirm :wink:. Especially since what I was doing on the Raspberry Pi no longer works on Ubuntu

Yes, it’s out of habit, I’ve always made sure my machines are up to date