"Permission denied" - issues installing QIIME2-2022.2 in WSL w/ conda

Hi All,

I am trying to install the latest release of QIIME2 as instructed at Natively installing QIIME 2 — QIIME 2 2022.2.0 documentation . I haven't updated QIIME2 for a while - the distribution I've been using until now is 2021.8, in its own conda environment, which still works fine. I have been unable to find forum posts detailing this particular issue so far, but I apologize if I've missed something.

I am running WSL and using a conda environment, and I have ensured that conda is up to date and wget is installed as the instructions specify. Whenever I run the wget command, I receive the following:

wget https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml

--2022-05-08 18:39:46-- https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml
Resolving data.qiime2.org (data.qiime2.org)... 54.200.1.12
Connecting to data.qiime2.org (data.qiime2.org)|54.200.1.12|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml [following]
--2022-05-08 18:39:46-- https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9667 (9.4K) [text/plain]
qiime2-2022.2-py38-linux-conda.yml: Permission denied

Cannot write to ‘qiime2-2022.2-py38-linux-conda.yml’ (Success).

Subsequent attempts to create a conda environment for the distribution fail, because (as far as I can tell) the new distribution cannot be successfully installed.

I have tried on both an institutional and a private network, and have tried temporarily disabling my computer's firewall, but nothing has changed. Any suggestions or interpretations would be greatly appreciated!

Hi @dirtbugs,

Welcome to the :qiime2: forum!

Based on the error message that you shared, these lines stand out to me:

Can you navigate to your home directory within your user account (~/home/yourusername), run ls -lah, and share what the permissions look like for qiime2-2022.2-py38-linux-conda.yml?

Thanks! :lizard:

Hi @lizgehret ,

Something I perhaps should have mentioned in the original post, but it slipped my mind: I also tried entering the "wget" command prefaced by "sudo" and entering my password, this didn't change the resulting output at all - sorry if omitting this changes anything.

In response to your suggestion above, here's what I get:

~$ ls -lah
total 64M
drwxr-xr-x 9 j_romero j_romero 4.0K Jan 28 11:03 .
drwxr-xr-x 3 root root 4.0K May 14 2021 ..
-rw------- 1 j_romero j_romero 28K May 8 22:24 .bash_history
-rw-r--r-- 1 j_romero j_romero 220 May 14 2021 .bash_logout
-rw-r--r-- 1 j_romero j_romero 4.3K Jan 28 11:03 .bashrc
drwxrwxr-x 3 j_romero j_romero 4.0K Oct 8 2021 .cache
drwxrwxr-x 2 j_romero j_romero 4.0K Oct 8 2021 .conda
drwxrwxr-x 3 j_romero j_romero 4.0K Oct 8 2021 .config
drwxr-xr-x 2 j_romero j_romero 4.0K May 14 2021 .landscape
-rw-r--r-- 1 j_romero j_romero 0 May 11 11:46 .motd_shown
-rw-r--r-- 1 j_romero j_romero 807 May 14 2021 .profile
-rw-r--r-- 1 j_romero j_romero 0 Oct 8 2021 .sudo_as_admin_successful
-rw-rw-r-- 1 j_romero j_romero 180 May 11 11:49 .wget-hsts
-rw-rw-r-- 1 j_romero j_romero 64M Jul 21 2021 Miniconda3-py39_4.10.3-Linux-x86_64.sh
drwxrwxr-x 3 j_romero j_romero 4.0K Oct 8 2021 data
drwxr-xr-x 5 j_romero j_romero 4.0K Jan 28 11:03 edirect
drwxrwxr-x 16 j_romero j_romero 4.0K May 11 11:48 miniconda3
-rw-rw-r-- 1 j_romero j_romero 9.1K Oct 8 2021 qiime2-2021.8-py38-linux-conda.yml

Please let me know if this is what you were looking for, or if I need to try something else.

Thank you!

Hi again -

Humble pie update:

I tried running the installation/update commands from my home directory, instead of the mnt/c/WINDOWS/system32 directory that opens by default whenever I open WSL, and everything worked fine. I don't know whether this is something that should be totally obvious/go without saying (clearly I don't have a great grasp on the fundamentals of using Linux command line) so I apologize if I was wasting your time with something that shouldn't have been an issue in the first place (installation instructions on the QIIME2 page don't specify that things need to be done from the home directory, but perhaps this is because it's assumed that everyone will know that).

Thanks for your efforts to help out.

Hi @dirtbugs,

Thanks for following up! I'm glad you were able to get things working on your end! :partying_face:

The installation doesn't need to be done explicitly in your home directory, however this is typically where you'll have the most user permissions on your machine (which is why you didn't run into the same permissions issues that you did when you were in mnt/c/WINDOWS/system32).

From some brief research on WSL, it seems as though the default WSL directory hasn't always been the same as your user home directory - which has caused permissions issues for other people as well (although this issue seems to have been fixed here for WSL 1.12 and above).

If you're interested in learning more about user/group/file permissions on Linux, here's a nice tutorial that discusses it in a really approachable way.

Hope this helps! :nerd_face:

Cheers :lizard: