I am trying to run the Prokka annotation tool on my linux machine and have installed Barrnap and added it to $PATH and given the folder chmod 777 permission. However, when running Prokka, it gives the line Could not parse version from 'sh: 1: barrnap: Permission denied'.

Running Barrnap solely through the command line with a valid input works fine but does not seem to work when another script calls barrnap. I have tried checking path variables and giving max permissions to barrnap and Prokka but it does not seem to change this error. Here is the full log file:

[15:01:28] This is prokka 1.14.6
[15:01:28] Written by Torsten Seemann <[email protected]>
[15:01:28] Homepage is https://github.com/tseemann/prokka
[15:01:28] Local time is Thu Feb 23 15:01:28 2023
[15:01:28] You are saurab
[15:01:28] Operating system is linux
[15:01:28] You have BioPerl 1.7.8
[15:01:28] System has 16 cores.
[15:01:28] Will use maximum of 8 cores.
[15:01:28] Annotating as >>> Bacteria <<<
[15:01:28] Generating locus_tag from 'jobs/NC_004556.faa' contents.
[15:01:28] Setting --locustag ECJHPMJE from MD5 ec31963ed5d3d76e28501fa7e45ca273
[15:01:28] Creating new output folder: PROKKA_02232023
[15:01:28] Running: mkdir -p PROKKA_02232023
[15:01:28] Using filename prefix: PROKKA_02232023.XXX
[15:01:28] Setting HMMER_NCPU=1
[15:01:28] Writing log to: PROKKA_02232023/PROKKA_02232023.log
[15:01:28] Command: /home/saurab/BIOIN/basys2-app/sub_programs/prokka/bin/prokka jobs/NC_004556.faa
[15:01:28] Appending to PATH: /home/saurab/BIOIN/basys2-app/sub_programs/prokka/bin/../binaries/linux
[15:01:28] Appending to PATH: /home/saurab/BIOIN/basys2-app/sub_programs/prokka/bin/../binaries/linux/../common
[15:01:28] Appending to PATH: /home/saurab/BIOIN/basys2-app/sub_programs/prokka/bin
[15:01:28] Looking for 'aragorn' - found /home/saurab/BIOIN/phastest-app/sub_programs/aragorn
[15:01:28] Determined aragorn version is 001002 from 'ARAGORN v1.2   Dean Laslett'
[15:01:28] Looking for 'barrnap' - found /home/saurab/BIOIN/phastest-app/sub_programs/barrnap
[15:01:28] Coult not parse version from 'sh: 1: barrnap: Permission denied'
  • 1
    $\begingroup$ Please edit your question and add the output of ls -l /home/saurab/BIOIN/phastest-app/sub_programs/barrnap. You say you set the directory to 777 but what about the actual script/executable? $\endgroup$
    – terdon
    Feb 24, 2023 at 9:28

1 Answer 1


My suggestion is to run prokka from within conda by simply downloading miniconda then

conda create --name prokka
conda activate prokka
conda install -c conda-forge -c bioconda -c defaults prokka
prokka --help
prokka --version
prokka mycontigs.fa # running prokka

You could always perform a

chmod 700 /home/saurab/BIOIN/phastest-app/sub_programs/barrnap

or some variant like chmod 500 ...

or possibly using a recursive chmod -R 500 that sort of thing. Eventually it will work.

However, it strikes me you are installing prokka outside any virtual environment such as conda or brew and I would not do that personally, because you are giving significant permissions to the algorithm.

conda (or brew) will sort out all the permission needed and there's no need to do anything with chmod stuff.

Good luck with the annotation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.