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

podman compose up results in a permission denied error writing logs on Fedora #266

Closed
jmontleon opened this issue Jul 30, 2024 · 1 comment
Assignees

Comments

@jmontleon
Copy link
Member

jmontleon commented Jul 30, 2024

When running podman compose up on Fedora the output is flooded with errors PermissionError: [Errno 13] Permission denied: '/podman_compose/logs/kai_psql.log'.

I opened a podman issue to try to get some insight into why we see a difference with podman(-compose) on Mac and Fedora.
containers/podman#23439

I have also tried on a couple clean Fedora 40 VM installs with podman and podman-remote/machine and the issue reproduced, so I don't believe it is a system misconfiguration.

There are a few ways to proceed:

  1. More manual steps:
mkdir logs
podman unshare chown 1001:1001 logs
podman compose up
  1. Automated, but will cause problems with git:
    Update mounts to :rw,Z,U

But this will break the git repo if you try to fetch updates or do anything else:

$ git fetch upstream
fatal: detected dubious ownership in repository at '/home/jason/Documents/go/src/github.com/konveyor/kai'
To add an exception for this directory, call:

	git config --global --add safe.directory /home/jason/Documents/go/src/github.com/konveyor/kai
  1. Improving on 2:
  • Populate a logs directory in the repo
  • Add it to .gitignore
  • Add an additional volume mount - ${PWD}/logs:/podman_compose/logs:rw,z,U

I think unless we get some insight 3 is probably the most seamless approach.

@jmontleon jmontleon self-assigned this Jul 30, 2024
@jwmatthews
Copy link
Member

I'm good with trying out option #3

jmontleon added a commit to jmontleon/kai that referenced this issue Jul 30, 2024
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
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

No branches or pull requests

2 participants