sopel-irc/docker-sopel

Permission issues when config dir is mounted

Closed this issue · 1 comments

If an entire .sopel dir is mounted, the user will likely experience permission errors because the uid for sopel in the image is 100000.

Only ways I can think about this fix this:

1. Make user chown to correct uid first (this approach will eventually make its way into the doc)
2. Run image as root and have an entrypoint chown to correct uid (I am against this because the image should not change the user's stuff without their explicit permission)
3. Make default uid = 1000 (while not a true solution, it will likely solve this issue for >90% of users who only have their one user on their machine which defaults to uid = 1000 on most systems

Here's the plan:

  • Run image as root, and drop to sopel user with gosu su-exec (alpine) [#11]
  • Add script to change UID/GID of sopel Read PUID and PGID environment variables to set user sopel ids at start-up
  • Add script to chown any mounted dirs No longer needed given the change above.

Oh dear... this has become quite a mess, real fast 😱 Closing in favor of #12