mamba: Resolving from cache fails when cache dir rights are applied with ACL's

OS : RHEL7 Mamba version : 0.15.2 Conda version : 4.10.3

How to replicate :

  1. Create cache dir
mkdir -p /tmp/cache/conda
  1. Add ACL’s for your user
 setfacl -m d:u:<user>:rwx /tmp/cache/conda/
 setfacl -m u:<user>:rwx /tmp/cache/conda/
  1. Change folder owner to root to rely solely on ACL’s
chown root:root /tmp/cache/conda/

Expected behavior

conda create -n test python The command works fine and the cache is populated with downloaded packages.

Actual behavior

mamba create -n test python Resolving breaks while accessing cache registry

RuntimeError: Operation not permitted: '/tmp/cache/conda/cache/f7c32d1b.json'

In our use case, package cache has to be accesible to mutiple groups. We cannot rely solely on user:group rights.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 15 (11 by maintainers)

Most upvoted comments

having occasionally the same issue with mamba 0.19.1, conda 4.11.0 on Ubuntu 20.04, with shared conda folder for all users, which are in the same group.

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/conda/exceptions.py", line 1080, in __call__
        return func(*args, **kwargs)
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/conda_env/cli/main.py", line 80, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/conda_env/cli/main_create.py", line 141, in execute
        result[installer_type] = installer.install(prefix, pkg_specs, args, env)
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/mamba/mamba_env.py", line 45, in mamba_install
        index = load_channels(pool, channel_urls, repos, prepend=False)
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/mamba/utils.py", line 122, in load_channels
        index = get_index(
      File "/opt/conda/miniconda3/lib/python3.8/site-packages/mamba/utils.py", line 103, in get_index
        is_downloaded = dlist.download(True)
    RuntimeError: Operation not permitted: '/opt/conda/miniconda3/pkgs/cache/976d321b.json'

This affects us as well.