How to migrate a file on Linux server?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have renamed a shell script on my linux server and uploaded a new file through FTP tool like WinScp.
Now, I am trying to execute this file through Terminal but I am getting Permission Denied Error.
To fix this issue, I executed touch command but still have the same issue.
I am using the same user account to login into Terminal as well as upload the file.
Is this the permission issue like my user account hasn't access to upload the file?
linux filesystems ftp
add a comment |
I have renamed a shell script on my linux server and uploaded a new file through FTP tool like WinScp.
Now, I am trying to execute this file through Terminal but I am getting Permission Denied Error.
To fix this issue, I executed touch command but still have the same issue.
I am using the same user account to login into Terminal as well as upload the file.
Is this the permission issue like my user account hasn't access to upload the file?
linux filesystems ftp
add a comment |
I have renamed a shell script on my linux server and uploaded a new file through FTP tool like WinScp.
Now, I am trying to execute this file through Terminal but I am getting Permission Denied Error.
To fix this issue, I executed touch command but still have the same issue.
I am using the same user account to login into Terminal as well as upload the file.
Is this the permission issue like my user account hasn't access to upload the file?
linux filesystems ftp
I have renamed a shell script on my linux server and uploaded a new file through FTP tool like WinScp.
Now, I am trying to execute this file through Terminal but I am getting Permission Denied Error.
To fix this issue, I executed touch command but still have the same issue.
I am using the same user account to login into Terminal as well as upload the file.
Is this the permission issue like my user account hasn't access to upload the file?
linux filesystems ftp
linux filesystems ftp
edited Mar 9 at 12:23
Rui F Ribeiro
41.9k1483142
41.9k1483142
asked Dec 10 '15 at 22:22
ursitesionursitesion
46241222
46241222
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You need to make the file excutable. The touch
command doesn't do that, the chmod
command does:
chmod a+x some_new_file.sh
Or use your GUI to set the excutable permissions on the file.
Don't forget, if you're uploading a script, that you must transfer the file in TEXT mode and not in BINARY mode. Otherwise it'll fail at the next step (when you run it).
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
add a comment |
To see the permissions on your file run:
ls -l yourfile
You should see output like:
$ ls -l newfile
-rw-rw-r--. 1 ira ira 0 Dec 11 09:41 newfile
Where the "-rw-rw-r--." part is read/write/execute permissions for the user, group and everybody else. The 'ira ira' part is the user and then the group that the user belongs to.
From more info on chown and chmod see this how-to article
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f248669%2fhow-to-migrate-a-file-on-linux-server%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to make the file excutable. The touch
command doesn't do that, the chmod
command does:
chmod a+x some_new_file.sh
Or use your GUI to set the excutable permissions on the file.
Don't forget, if you're uploading a script, that you must transfer the file in TEXT mode and not in BINARY mode. Otherwise it'll fail at the next step (when you run it).
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
add a comment |
You need to make the file excutable. The touch
command doesn't do that, the chmod
command does:
chmod a+x some_new_file.sh
Or use your GUI to set the excutable permissions on the file.
Don't forget, if you're uploading a script, that you must transfer the file in TEXT mode and not in BINARY mode. Otherwise it'll fail at the next step (when you run it).
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
add a comment |
You need to make the file excutable. The touch
command doesn't do that, the chmod
command does:
chmod a+x some_new_file.sh
Or use your GUI to set the excutable permissions on the file.
Don't forget, if you're uploading a script, that you must transfer the file in TEXT mode and not in BINARY mode. Otherwise it'll fail at the next step (when you run it).
You need to make the file excutable. The touch
command doesn't do that, the chmod
command does:
chmod a+x some_new_file.sh
Or use your GUI to set the excutable permissions on the file.
Don't forget, if you're uploading a script, that you must transfer the file in TEXT mode and not in BINARY mode. Otherwise it'll fail at the next step (when you run it).
answered Dec 10 '15 at 22:27
roaimaroaima
46k758124
46k758124
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
add a comment |
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Thank you @roaima. Should I choose Text mode for all types of file like - XML, .pip, .php or only for shell scripts?
– ursitesion
Dec 10 '15 at 22:31
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
Hi roaima, can you please confirm about what is the difference between TEXT mode and ASCII mode transfer?
– ursitesion
Dec 11 '15 at 17:52
add a comment |
To see the permissions on your file run:
ls -l yourfile
You should see output like:
$ ls -l newfile
-rw-rw-r--. 1 ira ira 0 Dec 11 09:41 newfile
Where the "-rw-rw-r--." part is read/write/execute permissions for the user, group and everybody else. The 'ira ira' part is the user and then the group that the user belongs to.
From more info on chown and chmod see this how-to article
add a comment |
To see the permissions on your file run:
ls -l yourfile
You should see output like:
$ ls -l newfile
-rw-rw-r--. 1 ira ira 0 Dec 11 09:41 newfile
Where the "-rw-rw-r--." part is read/write/execute permissions for the user, group and everybody else. The 'ira ira' part is the user and then the group that the user belongs to.
From more info on chown and chmod see this how-to article
add a comment |
To see the permissions on your file run:
ls -l yourfile
You should see output like:
$ ls -l newfile
-rw-rw-r--. 1 ira ira 0 Dec 11 09:41 newfile
Where the "-rw-rw-r--." part is read/write/execute permissions for the user, group and everybody else. The 'ira ira' part is the user and then the group that the user belongs to.
From more info on chown and chmod see this how-to article
To see the permissions on your file run:
ls -l yourfile
You should see output like:
$ ls -l newfile
-rw-rw-r--. 1 ira ira 0 Dec 11 09:41 newfile
Where the "-rw-rw-r--." part is read/write/execute permissions for the user, group and everybody else. The 'ira ira' part is the user and then the group that the user belongs to.
From more info on chown and chmod see this how-to article
answered Dec 10 '15 at 22:45
HexdumpHexdump
772
772
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f248669%2fhow-to-migrate-a-file-on-linux-server%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