AMP-dockerized
AMP-dockerized copied to clipboard
Ensuring Correct File Permissions Takes Too Long
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.
It seems kind of hacky, but what if you caught any permission error and just added the current user to whatever group was set?
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?