-
Notifications
You must be signed in to change notification settings - Fork 198
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
Permissions Issues with Creating Backup??? #386
Comments
This implies that it is not where it is pushing it to that is the problem - which would be a permissions error - but reading the temporary dump file. When it dumps, it creates a single temporary dump file with all of the info, and then it uses the protocol (in your case, file) to send it to the target. Why it should not be able to read it is confusing. I don't think traces will help, but you can add It is possible that it is a permissions issue, but that would surprise me. Still, try uncommenting the |
Hmm I'll post my modified Docker compose file, but after eliminating all bind mounts, adding the env variable TRACE_STDERROR, and eliminating user 0:0, I'm really getting the same error. I'm kinda stuck when trying to debug the problem because the container is continually restarting. Ok - after looking at your dockerfile I think I see the problem. You created a non-root user and group of 1005:1005. The /backup directory was bind mounted but was owned by root:root with 755 permissions. Clearly the 1005 user/group was failing to be able to write because of the wrong permissions. Once I bind mounted a /backup directory owned on the docker host by 1005:1005, then things worked again. Not trying to complain, but can you advertise somewhere there is a non-root container. I'm aware that's the usual recommendations presently for security purposes, however I'm no docker experts, but usually everyday common users on a system -- their numbering on arch at least starts at 1000. I've oftened wondered when people create non-root containers why they create UIDs and GIDs that start anywhere near 1000 to avoid possible conflict with regular users on the system. Usually if I have a Dockerfile trying to recreate as non-root, I'll start with UID/GID of 10,000 or some very large number. Thanks for help |
Nice catch. And that also means that the log message is misleading, because it looked like it could not read the staging file, not that it could not write the target file. Worth adding a little more verbosity to that.
Why not? 😄
Does this help? |
Yea thanks for updating the documentation.
…On Wed, Dec 4, 2024 at 12:39 PM Avi Deitcher ***@***.***> wrote:
Clearly the 1005 user/group was failing to be able to write because of the
wrong permissions. Once I bind mounted a /backup directory owned on the
docker host by 1005:1005, then things worked again.
Nice catch. And that also means that the log message is misleading,
because it looked like it could not *read* the staging file, not that it
could not *write* the target file. Worth adding a little more verbosity
to that.
Not trying to complain
Why not? 😄
can you advertise somewhere there is a non-root container
Does this
<https://github.com/databacker/mysql-backup/blob/f540139008670baa761437d77002b441455ad886/docs/container_considerations.md>
help?
—
Reply to this email directly, view it on GitHub
<#386 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH75V7OWIRSDREGSUUFGW32D5D7NAVCNFSM6AAAAABS6KUM4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYGI2TANBYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
See #387 for the misleading errors. |
I'm actually not sure what the error is attributable to. Here is my error:
Here is my compose file sections:
I'm not sure if I'm looking at a file permissions issue here of what?
The text was updated successfully, but these errors were encountered: