managing /tmp/balena/updates.lock

Hi, I used to be able to install a updates.lock using lockfile from within a container to prevent updates.

Suddenly this now fails.

I have checked that my controller still has lockfile installed.

The command that used to work is

lockfile /tmp/balena/updates.lock

It now fails with

lockfile: Try praying, giving up on "/tmp/balena/updates.lock"

running touch /tmp/balena/updates.lock gives me a permissions error whilst the permissions seem ok.

touch /tmp/balena/updates.lock
touch: cannot touch '/tmp/balena/updates.lock': Permission denied
ls -la /tmp/balena/
total 4
drwxr-xr-x 2 root root   40 Jul 17 08:56 .
drwxrwxrwt 1 root root 4096 Jul 17 12:57 ..

What could be the problem.

Since the particular container has access to the supervisor api i thought that maybe i could supervisor to manage these lockfiles via an api request and therefore circumventing the permission issue. However I do’t see any endpoint for that. Does one exist?

Don’t know what happened but a device restart solved the permission issues

1 Like

Glad to see you got it to work @bas, we have not made any changes to the permissions of the mount in /tmp/balena. I assume you were running commands as root within the container. Please let us know if you see the issue again and we’ll investigate some more