How to migrate a file on Linux server?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















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?










share|improve this question






























    1















    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?










    share|improve this question


























      1












      1








      1








      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 12:23









      Rui F Ribeiro

      41.9k1483142




      41.9k1483142










      asked Dec 10 '15 at 22:22









      ursitesionursitesion

      46241222




      46241222




















          2 Answers
          2






          active

          oldest

          votes


















          1














          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).






          share|improve this answer























          • 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


















          1














          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






          share|improve this answer























            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
            );



            );













            draft saved

            draft discarded


















            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









            1














            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).






            share|improve this answer























            • 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















            1














            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).






            share|improve this answer























            • 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













            1












            1








            1







            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).






            share|improve this answer













            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).







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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

















            • 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













            1














            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






            share|improve this answer



























              1














              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






              share|improve this answer

























                1












                1








                1







                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






                share|improve this answer













                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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 10 '15 at 22:45









                HexdumpHexdump

                772




                772



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay