"Permission denied" while running a bash script
8,103
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.
Related videos on Youtube
Author by
Z Azin
Updated on September 18, 2022Comments
-
Z Azin over 1 year
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!
-
Z Azin about 5 yearsYes, 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
-
vidarlo about 5 yearsPost a new question if you have a new question. If you want help debugging, include all of your script.