“Permission denied” while running a bash script
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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!
command-line bash permissions scripts
add a comment |
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!
command-line bash permissions scripts
add a comment |
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!
command-line bash permissions scripts
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!
command-line bash permissions scripts
command-line bash permissions scripts
edited Feb 12 at 5:56
vidarlo
10.7k52852
10.7k52852
asked Feb 12 at 5:50
Z AzinZ Azin
82
82
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
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 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 at 6:27
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117565%2fpermission-denied-while-running-a-bash-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
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 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 at 6:27
add a comment |
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.
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 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 at 6:27
add a comment |
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.
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.
answered Feb 12 at 5:58
vidarlovidarlo
10.7k52852
10.7k52852
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 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 at 6:27
add a comment |
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 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 at 6:27
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 at 6:25
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 at 6:25
1
1
Post a new question if you have a new question. If you want help debugging, include all of your script.
– vidarlo
Feb 12 at 6:27
Post a new question if you have a new question. If you want help debugging, include all of your script.
– vidarlo
Feb 12 at 6:27
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117565%2fpermission-denied-while-running-a-bash-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown