AMP-dockerized icon indicating copy to clipboard operation
AMP-dockerized copied to clipboard

Ensuring Correct File Permissions Takes Too Long

Open MitchTalmadge opened this issue 4 years ago • 2 comments

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.

MitchTalmadge avatar Nov 30 '20 05:11 MitchTalmadge

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

kevinpthorne avatar May 21 '21 16:05 kevinpthorne

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?

shaneedwards avatar Nov 22 '22 22:11 shaneedwards