Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix api-db fix-permissions permissions to actually fix api-db permissions #3081

Merged
merged 1 commit into from
Mar 26, 2022

Conversation

tobybellwood
Copy link
Member

Because this step was previously called under the mysql user to operate on files/folders owned by root, it would fail (silently - because of uselagoon/lagoon-images#420).

This PR moves the chown and fix-permissions into the USER root block, ensuring that they are correctly set prior to changing user back to mysql.

previously:

/var/lib/mysql$ ls -al /docker-entrypoint-initdb.d
total 80
drwxrwxr-x    1 mysql    root          4096 Mar 16 05:41 .
drwxr-xr-x    1 root     root          4096 Mar 16 07:01 ..
-rw-rw-r--    1 root     root         13641 Mar 16 05:40 00-tables.sql
-rw-rw-r--    1 root     root         41063 Mar 16 05:40 01-migrations.sql
-rw-rw-r--    1 root     root            30 Mar  9 06:06 02-views.sql
-rw-rw-r--    1 root     root          1250 Mar  9 06:06 03-procedures.sql
-rwxrwxr-x    1 root     root          1373 Mar  9 06:06 04-generate-ssh-key-fingerprints.sh

After this PR

/var/lib/mysql$ ls -al /docker-entrypoint-initdb.d
total 80
drwxrwxr-x    1 mysql    root          4096 Mar 25 01:17 .
drwxr-xr-x    1 root     root          4096 Mar 25 02:13 ..
-rw-rw-r--    1 mysql    root         13641 Mar 17 02:14 00-tables.sql
-rw-rw-r--    1 mysql    root         41063 Mar 17 02:14 01-migrations.sql
-rw-rw-r--    1 mysql    root            30 Mar 17 02:14 02-views.sql
-rw-rw-r--    1 mysql    root          1250 Mar 17 02:14 03-procedures.sql
-rwxrwxr-x    1 mysql    root          1373 Dec 14 08:38 04-generate-ssh-key-fingerprints.sh

@tobybellwood tobybellwood changed the title fix api-db fix-permissions to actually fix permissions fix api-db fix-permissions permissions to actually fix api-db permissions Mar 26, 2022
@tobybellwood tobybellwood merged commit c585cec into main Mar 26, 2022
@tobybellwood tobybellwood deleted the api-db-fix-permissions branch March 26, 2022 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant