1

I'm new to linux, coding and generally computer sciences. I am trying to run a bash script, but I get this error:

./fastalign_train.sh: line 5: /forward.align: Permission denied
./fastalign_train.sh: line 6: /reverse.align: Permission denied

There are two txt files (forward.align and reverse.align): ls -l result:

-rwxr-xr-x 1 tara tara      72 Feb 12 08:05 reverse.align
-rwxr-xr-x 1 tara tara      76 Feb 12 08:05 forward.align
-rwxr-xr-x 1 tara tara 2089888 Feb 11 03:00 fast_align
-rwxrwxrwx 1 tara tara     242 Feb 11 12:32 fastalign_train.sh

Any idea? Thank you guys!

1 Answer 1

2

The hint is in the filename shown: /forward.align

This implies that you try to write to /forward.align, which is in the root (/) of the file system. Users do not have write permissions there.

Replace /forward.align with either ./forward.align or forward.align., and same for /reverse.align, and it should work.

2
  • Yes, it runs now but there is no output...like nothing happens. this is the main line of my bash code: ${FASTALIGN}/fast_align -i $1 -d -o -v -p $2/fwd_params > $2./forward.align 2>$2./fwd_err
    – Z Azin
    Feb 12, 2019 at 6:25
  • 1
    Post a new question if you have a new question. If you want help debugging, include all of your script.
    – vidarlo
    Feb 12, 2019 at 6:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .