I'm a biomedical scientist and I'm having trouble running a custom data analysis pipeline written by one of our collaborators. His script crashes with

/bin/sh: 1: /usr/local/bin/FastQC/FastQC_v0.10.1: Permission denied
make[2]: *** [/home/kat/gentrap.git/gentrap_OUT/1_Bira_TAAGGCGAGAGTAG_R1.fastqc] Error 1
make[2]: Leaving directory `/home/kat'

Thing is, I've already made myself the owner of /usr/local/bin/FastQC (sudo chown -R user:user /usr/local/bin/FastQC) and given myself read/write/executable permissions (sudo chmod -R +rwx /usr/local/bin/FastQC). I tried listing permissions with ls -la and I'm a little confused by the output:

drwxr-xr-x 3 kat  kat  4096 mei  8 14:20 .
drwxr-xr-x 5 root root 4096 mei  8 14:20 ..
drwxr-xr-x 7 kat  kat  4096 mei  8 14:20 FastQC_v0.10.1

As I understand it, that means I'm the owner of the current directory and the subdirectory FastQC_v0.10.1, and I should have all the permissions. Root is the owner of the parent directory, which would be /usr/local/bin. Am I reading this output correctly? Why would the script be crashing due to insufficient permissions?

  • run the script like this sudo /path/script – Avinash Raj May 8 '14 at 14:15
  • The script cannot be run that way. I'm not sure if it technically can be called a script. It is executed by "make -j 7 -f (a whole lot of flags)" in the installation directory. – user279430 May 8 '14 at 14:28
  • Please show us the script. We can't help unless we know what it's trying to do. – terdon May 8 '14 at 14:31
  • 1
    Is FastQC_v0.10.1 supposed to be a directory or a file? – glenn jackman May 8 '14 at 15:07
  • 1
    OK in that case, you should ask your collaborator. The error you're getting implies you're trying to execute something that either isn't executable or that you don't have permissions to execute. Without knowing what it is that you're attempting to run, we can't help. You should be able to post just the relevant lines of the program, it's just a text file after all, not compiled code. I find it very hard to believe that your collaborator would mind. If he does, change your collaborator. The bioinformatics community thrives on open source. – terdon May 9 '14 at 0:50

I got the same error. I end up putting FastQC to /usr/share, as many other packages are put there, and put a link to /usr/local/bin, as suggested by the installation guide. Then I changed the permissions to files under FastQC.

sudo ln -s /path/to/FastQC/fastqc /usr/local/bin/fastqc
sudo chmod -R 755 /path/to/FastQC

I think /usr/local/bin/FastQC is a symlinked directory and since you said you already own it, then probably you may have to add the execute permission to the original location where the fastqc program is. Also note at what step the script crashes - is the script trying to create any files/directories at places you don't have permission to, etc..

sudo chmod -R +rwx /usr/local/bin/FastQC

Should have set the read / write / execute flag to /usr/local/bin/FastQC and to its content for the owner, for the group and for the others, but from your ls -la output the group and the others are missing the write flag:

drwxr-xr-x 3 kat  kat  4096 mei  8 14:20 .
drwxr-xr-x 7 kat  kat  4096 mei  8 14:20 FastQC_v0.10.1

Altough this might not be a problem, it looks like chmod somehow failed.

The first thing I'd try would be to run chmod -R +rwx /usr/local/bin/FastQC again and check whether /usr/local/bin/FastQC and its inner folders / files (which might don't have the read / write / execute flags set for the owner already) are actually set to be read / written / executed by the owner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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