Cant "wget" Update modules, permission denied

Hello everyone,
i’ve got the problem i can’t “install” a single update Module.
I’ve tried for example: mkdir -p /usr/share/mender/modules/v3 && wget -P /usr/share/mender/modules/v3
And got

--2023-08-07 10:44:26--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2932 (2.9K) [text/plain]
/usr/share/mender/modules/v3/rootfs-image-v2: Permission denied

Cannot write to ‘/usr/share/mender/modules/v3/rootfs-image-v2’ (Permission denied).

I’m totally new to Mender as well as any Linux OS.

Hope you can help me in any kind of way.

Kind Regards

permission denied is because your Linux user does nos have sudo privilege (Linux sudo commands for beginners)
use sudo before your command and it should work :slight_smile:

I would love to say it worked, but it didn’t. Even with sudo.
Getting exact the same Error.
But i was able to manage it. For some reason the directory was read only.
i used:

sudo chmod ...

to set it also for writing and then your sudo command worked just fine. TY

1 Like

@fbaer It’s recommended to maintain the directory’s permissions as they are, even if you’re the only one accessing the device. Keeping sensitive files and folders in secure read-only mode is good practice.

In the shell, ‘&&’ is a separator that you can interpret as ‘and,’ so you need to re-use the ‘sudo’ on the second command as well.

1 Like

Even better. TY

1 Like