# Conda failed to create env when environment.yml folder is read only

**URL:** <https://community.seqera.io/t/conda-failed-to-create-env-when-environment-yml-folder-is-read-only/1306>\
**Category:** Ask for help\
**Tags:** nextflow\
**Created:** [October 17, 2024, 6:52pm UTC](https://community.seqera.io/t/conda-failed-to-create-env-when-environment-yml-folder-is-read-only/1306 "2024-10-17T18:52:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yinshiyi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/yinshiyi/32/1091_2.png) [@yinshiyi](https://community.seqera.io/u/yinshiyi)\
**Post date:** [October 17, 2024, 6:52pm UTC](https://community.seqera.io/t/conda-failed-to-create-env-when-environment-yml-folder-is-read-only/1306/1 "2024-10-17T18:52:15Z")

</div>

I use conda.yml file for a process.  
The process run fine under my dev account and test.  
I do not want to give other user write access to the nextflow repo.  
The user is running into errors that conda want to write a temp file in the location where environment.yml is located.

Any idea how to get around this?  
Conda version 23.5  
nextflow latest edge.  
A similar bug is reported in Conda

> <https://github.com/conda/conda/issues/10098>
>
> \<!--
> Hi! Read this; it's important.
> 
> This is an issue tracker for conda -- t…he package manager. File feature requests
> for conda here, as well as bug reports about something conda has messed up.
> 
> Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
> 
> If your issue is a bug report for:
> 
> 
> \* a specific conda package from Anaconda ('defaults' channel):
> ==\> file at https://github.com/ContinuumIO/anaconda-issues
> \* a specific conda package from conda-forge:
> ==\> file at the corresponding feedstock under https://github.com/conda-forge
> \* repo.anaconda.com access and service:
> ==\> file at https://github.com/ContinuumIO/anaconda-issues
> \* anaconda.org access and service:
> ==\> file at https://anaconda.org/contact/report
> \* commands under 'conda build':
> ==\> file at https://github.com/conda/conda-build
> \* commands under 'conda env':
> ==\> please file it here!
> \* all other conda commands that start with 'conda':
> ==\> please file it here!
> 
> If you continue on,
> 
> \*\*please include all requested information below.\*\*
> 
> If a maintainer determines the information is required to understand 
> your issue, and if it is not provided, your issue may be
> closed automatically.
> 
> \--\>
> 
> \## Current Behavior
> \<!-- What actually happens?
> If you want to include console output, please use "Steps to Reproduce" below. --\>
> 
> \`conda run\` writes an activation script to a temporary file \_in the target environment directory\_, which means it can't be used with shared environments (unless all users have write access to the conda location - not a good idea)
> 
> \### Steps to Reproduce
> \<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
> Include the exact conda commands that reproduce the issue and their output between the ticks below. --\>
> 
> 
> \`\`\`
> $ export CONDA\_TEST\_SAVE\_TEMPS=true
> $ conda run -n drugs\_and\_money cylc --version
> WARNING conda.cli.main\_run:execute(39): CONDA\_TEST\_SAVE\_TEMPS :: retaining main\_run script\_caller \\
> /home/oliverh/miniconda3/envs/drugs\_and\_money/.tmprsaedgg3
> 8.0a2
> 
> $ cat /home/oliverh/miniconda3/envs/drugs\_and\_money/.tmprsaedgg3
> eval "$(/home/oliverh/miniconda3/bin/conda shell.posix hook)"
> conda activate /home/oliverh/miniconda3/envs/drugs\_and\_money
> cylc --version
> \`\`\`
> 
> \## Expected Behavior
> 
> \`conda run\` should write the temporary activation script to a standard temp file location for the user.
> 
> \## Environment Information
> \<details open\>\<summary\>\<code\>\`conda info\`\</code\>\</summary\>\<p\>
> 
> 
> \`\`\`
> active environment : /tmp
> active env location : /tmp
> shell level : 0
> user config file : /home/oliverh/.condarc
> populated config files : /home/oliverh/.condarc
> conda version : 4.8.3
> conda-build version : not installed
> python version : 3.7.7.final.0
> virtual packages : \_\_glibc=2.17
> base environment : /home/oliverh/miniconda3 (writable)
> channel URLs : https://conda.anaconda.org/conda-forge/linux-64
> https://conda.anaconda.org/conda-forge/noarch
> package cache : /home/oliverh/miniconda3/pkgs
> /home/oliverh/.conda/pkgs
> envs directories : /home/oliverh/miniconda3/envs
> /home/oliverh/.conda/envs
> platform : linux-64
> user-agent : conda/4.8.3 requests/2.24.0 CPython/3.7.7 Linux/3.10.0-1127.13.1.el7.x86\_64 centos/7.8.2003 glibc/2.17
> UID:GID : 8560:10000
> netrc file : None
> offline mode : False
> \`\`\`
> 
> \</p\>\</details\>
> 
> \<details open\>\<summary\>\<code\>\`conda config --show-sources\`\</code\>\</summary\>\<p\>
> 
> 
> \`\`\`
> auto\_activate\_base: False
> ssl\_verify: True
> channel\_priority: disabled
> channels:
> - conda-forge
> unsatisfiable\_hints: True
> anaconda\_upload: False
> \`\`\`
> 
> \</p\>\</details\>
> 
> \<details\>\<summary\>\<code\>\`conda list --show-channel-urls\`\</code\>\</summary\>\<p\>
> 
> 
> \`\`\`
> conda list --show-channel-urls
> \# packages in environment at /home/oliverh/miniconda3:
> \#
> \# Name Version Build Channel
> \_libgcc\_mutex 0.1 main defaults
> brotlipy 0.7.0 py37h7b6447c\_1000 defaults
> ca-certificates 2020.6.24 0 defaults
> certifi 2020.6.20 py37\_0 defaults
> cffi 1.14.0 py37he30daa8\_1 defaults
> chardet 3.0.4 py37\_1003 defaults
> conda 4.8.3 py37\_0 defaults
> conda-package-handling 1.6.0 py37h8f50634\_2 conda-forge
> cryptography 2.9.2 py37h1ba5d50\_0 defaults
> idna 2.10 py\_0 defaults
> ld\_impl\_linux-64 2.34 h53a641e\_7 conda-forge
> libedit 3.1.20191231 h14c3975\_1 defaults
> libffi 3.3 he6710b0\_2 defaults
> libgcc-ng 9.2.0 hdf63c60\_0 conda-forge
> libstdcxx-ng 9.2.0 hdf63c60\_2 conda-forge
> ncurses 6.2 he6710b0\_1 defaults
> openssl 1.1.1g h7b6447c\_0 defaults
> pip 20.1.1 py37\_1 defaults
> pycosat 0.6.3 py37h7b6447c\_0 defaults
> pycparser 2.20 py\_2 defaults
> pyopenssl 19.1.0 py\_1 defaults
> pysocks 1.7.1 py37\_1 defaults
> python 3.7.7 hcff3b4d\_5 defaults
> python\_abi 3.7 1\_cp37m conda-forge
> readline 8.0 h7b6447c\_0 defaults
> requests 2.24.0 py\_0 defaults
> ruamel\_yaml 0.15.87 py37h7b6447c\_1 defaults
> setuptools 49.2.0 py37\_0 defaults
> six 1.15.0 py\_0 defaults
> sqlite 3.32.3 h62c20be\_0 defaults
> tk 8.6.10 hbc83047\_0 defaults
> tqdm 4.48.0 pyh9f0ad1d\_0 conda-forge
> urllib3 1.25.9 py\_0 defaults
> wheel 0.34.2 py37\_0 defaults
> xz 5.2.5 h7b6447c\_0 defaults
> yaml 0.2.5 h7b6447c\_0 defaults
> zlib 1.2.11 h7b6447c\_3 defaults
> \`\`\`
> 
> \</p\>\</details\>

```auto
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: failed

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

    PermissionError: [Errno 13] Permission denied: 'nextflow_repo/config/condaenv.bbgfzbg4.requirements.txt'

```
