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

Permission denied when recreating symlink #1032

Closed
1 task done
maresb opened this issue Apr 29, 2023 · 0 comments · Fixed by #1033
Closed
1 task done

Permission denied when recreating symlink #1032

maresb opened this issue Apr 29, 2023 · 0 comments · Fixed by #1033
Labels

Comments

@maresb
Copy link
Contributor

maresb commented Apr 29, 2023

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

There seems to be an issue with the activate.sh script failing in case the user doesn't have permissions to modify the symlink.

For example, in the following Dockerfile, if the environment is activated by root, then all subsequent non-root user activations fail with

ln: failed to create symbolic link '/opt/conda/share/gdb/auto-load//opt/conda/lib/*.py': Permission denied 
FROM mambaorg/micromamba:git-3208378

RUN micromamba install -y -n base -c conda-forge libarrow

ARG MAMBA_DOCKERFILE_ACTIVATE=1

USER root

RUN echo "Environment containing libarrow activated as root"

USER $MAMBA_USER

RUN echo "Activate as user without root permission"

I'm not sure how to best mitigate this, but one simple idea would be to not recreate the symlink if it already exists and points to the correct location.

Installed packages

See Dockerfile

Environment info

See Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant