Wrong ownership of forgejo service user's mount points #12

Closed
opened 2026-11-06 17:00:22 +00:00 by bpoldrack · 0 comments
Member

Directories in the service user's home dir (gitea, conf, custom, etc.) end up being owned by user:root instead of user:user.
I suspect that there's something not quite right when running ensure_dirs because the call to the file.directory operation is specifying the user but not the group and one has to run that deployment with ---sudo.
The result is, that forgejo deployment can't succeed the first time, b/c these are dirs to be mounted under /var/lib/gitea within the container, but the messed up ownership prevents this with a - from "naive" user's POV not very enlightening - OCI permission error on /var/lib/gitea/conf etc.

Logging in after a first run of that deployment and running chown -R <user>:<user> <userhome> fixes it and a second run then completes the deployment.

Directories in the service user's home dir (gitea, conf, custom, etc.) end up being owned by `user:root` instead of `user:user`. I suspect that there's something not quite right when running `ensure_dirs` because the call to the `file.directory` operation is specifying the user but not the group and one has to run that deployment with `---sudo`. The result is, that forgejo deployment can't succeed the first time, b/c these are dirs to be mounted under /var/lib/gitea within the container, but the messed up ownership prevents this with a - from "naive" user's POV not very enlightening - OCI permission error on `/var/lib/gitea/conf` etc. Logging in after a first run of that deployment and running `chown -R <user>:<user> <userhome>` fixes it and a second run then completes the deployment.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab-in-a-box/liab-deployments#12
No description provided.