question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSError: [Errno 13] Permission denied: '/local'

See original GitHub issue

Hi

I know somebody down here had the same problem.

I’m trying to use optotype in docker: docker run -v /local/pVACtools/:/data/ -t fred2/optitype --input SRR2672972_1.fastq SRR2672972_2.fastq --rna -o /local/pVACtools/Optitype/RNA_control

And I get this:

Traceback (most recent call last):
  File "/usr/local/bin/OptiType/OptiTypePipeline.py", line 235, in <module>
    os.makedirs(args.outdir)        
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/local'

I assume that python 2.7is also in the docker. I’ve tried to run this as sudo and ik keeps showing the same errors.

Thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
ju-mucommented, Mar 20, 2018

Actually I did this, however the solution in my case was to give 777 permissions to the mounted, local folder. I guess this is all related to the lack of experience with docker, but the next issue I ran into was then

sudo docker run -v /local/directory:/data/ -t fred2/optitype -i x_1.fastq.gz x_2.fastq.gz -d -o /data/

[E::hts_open_format] Failed to open file /data/2018_03_20_15_06_37/2018_03_20_15_06_37_1.bam Traceback (most recent call last): File "/usr/local/bin/OptiType/OptiTypePipeline.py", line 299, in <module> pos, read_details = ht.pysam_to_hdf(bam_paths[0]) File "/usr/local/bin/OptiType/hlatyper.py", line 186, in pysam_to_hdf sam = pysam.AlignmentFile(samfile, sam_or_bam) File "pysam/libcalignmentfile.pyx", line 444, in pysam.libcalignmentfile.AlignmentFile.__cinit__ File "pysam/libcalignmentfile.pyx", line 621, in pysam.libcalignmentfile.AlignmentFile._open IOError: [Errno 2] could not open alignment file /data/2018_03_20_15_06_37/2018_03_20_15_06_37_1.bam: No such file or directory

Any idea?

0reactions
Magisterh1commented, May 5, 2022

I had the same permission errors (Ubuntu server). I did the following and so far optitype is running: sudo adduser biodocker sudo chown -R :users /work/Projects sudo chmod -R 777 /work/Projects sudo docker run -v /work/Projects:/data -t fred2/optitype -i EA005_001_1.fq EA005_001_2.fq -d -o /data

Update: Optitype finished without errors 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - OSError - Errno 13 Permission denied - Stack Overflow
I'm using gunicorn. I get same error message. I want to give gunicorn read/write access to a folder under /home/portfolio. How do I...
Read more >
PermissionError: [Errno 13] Permission denied error solved
The error "PermissionError: [Errno 13] Permission denied error" often occurs when the file you are trying to read from or write to is...
Read more >
OSError: [Errno 13] Permission denied - Odoo
OSError : [Errno 13] Permission denied: ... Thanks for your subscription! ... Hello I have install openerp server and I can install features...
Read more >
Fix OS error: [Errno 13] Permission denied: '/etc/setoolkit/'
The problem is with the user and the Permission, you may be using Administrator account but yet it's not root ! in fact,...
Read more >
sudo: jupyter: command not found & OSError: [Errno 13 ...
When you use sudo , a different environment is in effect. Accordingly, your private bin folder ( /home/usr/.local/bin/jupyter ) is not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found