UNCLASSIFIED - NO CUI

Skip to content

User mysql has incorrect homedir permissions

Summary

When running this container as the user created, mysql, we are noticing that the homedir is not owned by this user so we cannot properly run commands in the container.

Steps to reproduce

docker run -it --entrypoint=/bin/bash registry1.dso.mil/ironbank/opensource/mariadb/mariadb:10.5.18
ls -lta /home

What is the current bug behavior?

Directory /home/mysql/ is owned by user:group root:mysql

What is the expected correct behavior?

The user should be able to write to its homedir

Relevant logs and/or screenshots

image

Possible fixes

I am surprised that the useradd command on the Dockerfile line 21 doesn't create a homedir by default for the user, but there is a mkdir on line 37 so I am confused why this is needed. It would fail if the homedir existed since there is no -p flag or anything.

Recommended useradd would be how it is run in python310: https://repo1.dso.mil/dsop/opensource/python/python310/-/blob/development/Dockerfile#L76

Tasks

  • Bug has been identified and corrected within the container
Edited by ariel.shnitzer
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information