MitchTalmadge / AMP-dockerized

CubeCoders AMP in a Docker Image. Easily create game servers for games like Minecraft, GMod, TF2, Factorio, and StarBound!
https://hub.docker.com/r/mitchtalmadge/amp-dockerized
Other
91 stars 22 forks source link

Ensuring Correct File Permissions Takes Too Long #45

Open MitchTalmadge opened 3 years ago

MitchTalmadge commented 3 years ago

On startup, the container resets all permissions in the volume to the UID/GID provided in the ENV vars. This makes sure there are no permission errors during operation. However, this process takes a very long time on large volumes. I wonder if we can find a faster method. Does chown check if the permissions are equal before setting them? If not, that might be room for improvement.

kevinpthorne commented 3 years ago

It seems kind of hacky, but what if you caught any permission error and just added the current user to whatever group was set?

shaneedwards commented 1 year ago

The low priority flag makes sense on this one, but would love to see a better solution. I'm up to about 45 minutes of file permission fixes per boot, so mid-day server restarts are painful.

Edit: Could you store the UID/GID from the ENV file in a local file on boot, and then on subsequent boot compare the two and only run a permission check if the ENV var has been updated?