Permission Error

Qiime 2- amplicon-2024.10, installed on Ubuntu
I tried to import my data by qiime tools import
--type 'SampleData[PairedEndSequencesWithQuality] '
--input-path raw-data/manifest.tsv
--input-format PairedEndFastqManifestPhred33V2
--output-path demuxe-paired-end.qza

Then I got PermissionError: [Error13] Permission denied: 'demuxe-paired-end.qza

How can I solve it please?

Hello @Amnah,

It looks like you don't have write permissions in the directory in which you ran that command. What sort of computing environment are you in--on your personal laptop, a university cluster, something else?

Hello,
Thank you for your reply!
Its my own laptop

Hello @Amnah,

A couple of things worth checking: do you have a folder with the same name as your --output-path file name? Have you run out of storage on your laptop?

If neither of these, can you run the following and post the output:

pwd
stat .
qiime tools import \
  --type 'SampleData[PairedEndSequencesWithQuality]' \
  --input-path raw-data/manifest.tsv \
  --input-format PairedEndFastqManifestPhred33V2 \
  --output-path demuxe-paired-end.qza


Hello Colinvwood, I did and upload what I got.. It seems not working.
Please look at it and let me know.

Your help is much appreciated.

Hello @Amnah,

The stat command is missing a period (.) after it.

A couple of things worth checking: do you have a folder with the same name as your --output-path file name? Have you run out of storage on your laptop?

Did you check these things?

If you feel comfortable doing so, can you run ls -lh in the directory in which you're running this command and post the output?

When you post command output please copy and paste it from the terminal and put it in a code block (between triple backticks: ``` ```) instead of taking a picture.

I dont have the folder with same name as the output path ( demuxe-paired-end.qza), the storage is okay.
Ill run it and let you know

This is what i got when running ls -lh

total 12K
drwxr-xr-x 2 root root 12K Dec 21 10:39 raw_data

Hello @Amnah,

And what about stat .?

This is what I got when I run stat .
File: .
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,16 Inode: 17335 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-01-08 19:10:02.202751261 +0000
Modify: 2024-12-21 08:51:23.447591054 +0000
Change: 2024-12-21 08:51:23.447591054 +0000
Birth: 2024-12-21 08:51:23.427591053 +0000
(qiime2-amplicon-2024.10) amnah@LAPTOP-S4MGA9IA:~/phd/bc_second$

Hello @Amnah,

What I believe is happening is that the "root" user owns these directories but you're running the command as the "amnah" user. Since this is just on your personal laptop a simple fix will be to run chmod 777 . in the directory you're running the command in. You may need to run sudo chmod 777 . if the previous command gives you a permission error. This will give anyone write access to the directory, which should resolve the error you're seeing.

Hi @colinvwood,
Thanks for your reply!

When I run chmod 777 . I got changing permissions of '.': Operation not permitted
Then run sudo chmod 777 . I got [sudo] password for amnah:
amnah is not in the sudoers file.

I hope you can help me.. with much thanks.

Hello @Amnah,

Try:

usermod -a -G sudo amnah

If this doesn't work try starting WSL with wsl --user root from the windows command prompt.

How do you usually launch WSL? Is there an option to launch as root when doing so? I'm not familiar with WSL.

Hello@ colinvwood,
I have tried both but permission denied still :pensive:

amnah@LAPTOP-S4MGA9IA:/root$ wsl --user root
Command 'wsl' not found, but can be installed with:
apt install wsl
Please ask your administrator.
amnah@LAPTOP-S4MGA9IA:/root$

Hello @Amnah,

The wsl --user root was supposed to be run from the windows command prompt. What did usermod -a -G sudo amnah return?

Hello@ colinvwood,
I run it on command prompt and got this
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)

  • Support: Ubuntu Pro | Ubuntu
    The rest of what I got
    System information as of Tue Jan 14 17:14:35 GMT 2025

System load: 0.64 Processes: 46
Usage of /: 9.7% of 250.92GB Users logged in: 0
Memory usage: 11% IPv4 address for eth0: 172.27.1.93
Swap usage: 0%

Hello @Amnah,

You should now be in a WSL shell with root permissions. Now you should try navigating to the proper directory and running chmod as mentioned above.

Hi@colinvwood,

I run chmod 777 . in ubuntu?

Hello @Amnah,

Yes, in the directory discussed previously.