Permission denied error while copying the files to another user directory using WINSCP?












1














I have a few folder in one of my ubuntu machine in the directory /export/home/ as -



user1
user2
user3


Whenever any user login to that machine, it always takes him to that directory as a default. If I am user1, and I am logging in to that machine, then after logging, if I do pwd, I always see -



/export/home/user1



Now what I am supposed to do is, I have opened a winscp on my desktop as user1 to connect to that machine, and then I need to copy a file from my desktop to user2 folder but whenever I try to open user2 folder in winscp, it always gives me -



Permission denied error..



Is there any way, I can ask user2 to give me permission (by logging into his account from putty) to copy the files using winscp from my desktop to user2 folder?










share|improve this question





























    1














    I have a few folder in one of my ubuntu machine in the directory /export/home/ as -



    user1
    user2
    user3


    Whenever any user login to that machine, it always takes him to that directory as a default. If I am user1, and I am logging in to that machine, then after logging, if I do pwd, I always see -



    /export/home/user1



    Now what I am supposed to do is, I have opened a winscp on my desktop as user1 to connect to that machine, and then I need to copy a file from my desktop to user2 folder but whenever I try to open user2 folder in winscp, it always gives me -



    Permission denied error..



    Is there any way, I can ask user2 to give me permission (by logging into his account from putty) to copy the files using winscp from my desktop to user2 folder?










    share|improve this question



























      1












      1








      1







      I have a few folder in one of my ubuntu machine in the directory /export/home/ as -



      user1
      user2
      user3


      Whenever any user login to that machine, it always takes him to that directory as a default. If I am user1, and I am logging in to that machine, then after logging, if I do pwd, I always see -



      /export/home/user1



      Now what I am supposed to do is, I have opened a winscp on my desktop as user1 to connect to that machine, and then I need to copy a file from my desktop to user2 folder but whenever I try to open user2 folder in winscp, it always gives me -



      Permission denied error..



      Is there any way, I can ask user2 to give me permission (by logging into his account from putty) to copy the files using winscp from my desktop to user2 folder?










      share|improve this question















      I have a few folder in one of my ubuntu machine in the directory /export/home/ as -



      user1
      user2
      user3


      Whenever any user login to that machine, it always takes him to that directory as a default. If I am user1, and I am logging in to that machine, then after logging, if I do pwd, I always see -



      /export/home/user1



      Now what I am supposed to do is, I have opened a winscp on my desktop as user1 to connect to that machine, and then I need to copy a file from my desktop to user2 folder but whenever I try to open user2 folder in winscp, it always gives me -



      Permission denied error..



      Is there any way, I can ask user2 to give me permission (by logging into his account from putty) to copy the files using winscp from my desktop to user2 folder?







      ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 11 '13 at 0:09

























      asked Dec 10 '13 at 23:59









      SSH

      4561712




      4561712






















          2 Answers
          2






          active

          oldest

          votes


















          0














          If you log in to an Ubuntu server as user1, then generally you do not have permission to add anything to user2's home directory.



          If you want to be able to, then here is one way you could get permissions. Execute these commands on the server (they will need to be executed by someone with sudo ability).



          sudo addgroup sharers
          sudo adduser user1 sharers
          sudo adduser user2 sharers
          sudo chgrp sharers /home/user2
          sudo chmod g+w /home/user2


          Then user1 will be able to drop files in to the /home/user2 directory.



          Finer grain control could be obtained using Access Control Lists (ACL's), but I won't go in to that here.






          share|improve this answer





















          • Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
            – SSH
            Dec 11 '13 at 1:09










          • He could do chmod o+w . - which would let anyone put files in his directory.
            – David Purdue
            Dec 11 '13 at 13:16



















          0
















          Have you tried changing the owner rights of the file you need to copy to the user2 folder?
          chown user1:user1 file.ext

          after that you could change the r/w/x/ rights on that file.
          chmod 0755 file.ext



          Another way you could look into are the group memberships.

          The created users, have their own groups?

          If you are using gnome/unity, you could take a look at the users and groups management tool
          users-admin from a terminal window Ctrl+Alt+t. If you don't have this tool installed enter the next command in a terminal window.
          sudo apt-get install gnome-system-tools, this will install the tool users-admin.

          With this tool you can grant user1 acces rights in user2 and/or user2 group, and vice versa for user2 and user3.
          Another thing comes to mind, take a closer look to ssh/scp/winscp group and/or usage rights for the user1, user2, user3 account.






          share|improve this answer





















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


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f388960%2fpermission-denied-error-while-copying-the-files-to-another-user-directory-using%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









            0














            If you log in to an Ubuntu server as user1, then generally you do not have permission to add anything to user2's home directory.



            If you want to be able to, then here is one way you could get permissions. Execute these commands on the server (they will need to be executed by someone with sudo ability).



            sudo addgroup sharers
            sudo adduser user1 sharers
            sudo adduser user2 sharers
            sudo chgrp sharers /home/user2
            sudo chmod g+w /home/user2


            Then user1 will be able to drop files in to the /home/user2 directory.



            Finer grain control could be obtained using Access Control Lists (ACL's), but I won't go in to that here.






            share|improve this answer





















            • Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
              – SSH
              Dec 11 '13 at 1:09










            • He could do chmod o+w . - which would let anyone put files in his directory.
              – David Purdue
              Dec 11 '13 at 13:16
















            0














            If you log in to an Ubuntu server as user1, then generally you do not have permission to add anything to user2's home directory.



            If you want to be able to, then here is one way you could get permissions. Execute these commands on the server (they will need to be executed by someone with sudo ability).



            sudo addgroup sharers
            sudo adduser user1 sharers
            sudo adduser user2 sharers
            sudo chgrp sharers /home/user2
            sudo chmod g+w /home/user2


            Then user1 will be able to drop files in to the /home/user2 directory.



            Finer grain control could be obtained using Access Control Lists (ACL's), but I won't go in to that here.






            share|improve this answer





















            • Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
              – SSH
              Dec 11 '13 at 1:09










            • He could do chmod o+w . - which would let anyone put files in his directory.
              – David Purdue
              Dec 11 '13 at 13:16














            0












            0








            0






            If you log in to an Ubuntu server as user1, then generally you do not have permission to add anything to user2's home directory.



            If you want to be able to, then here is one way you could get permissions. Execute these commands on the server (they will need to be executed by someone with sudo ability).



            sudo addgroup sharers
            sudo adduser user1 sharers
            sudo adduser user2 sharers
            sudo chgrp sharers /home/user2
            sudo chmod g+w /home/user2


            Then user1 will be able to drop files in to the /home/user2 directory.



            Finer grain control could be obtained using Access Control Lists (ACL's), but I won't go in to that here.






            share|improve this answer












            If you log in to an Ubuntu server as user1, then generally you do not have permission to add anything to user2's home directory.



            If you want to be able to, then here is one way you could get permissions. Execute these commands on the server (they will need to be executed by someone with sudo ability).



            sudo addgroup sharers
            sudo adduser user1 sharers
            sudo adduser user2 sharers
            sudo chgrp sharers /home/user2
            sudo chmod g+w /home/user2


            Then user1 will be able to drop files in to the /home/user2 directory.



            Finer grain control could be obtained using Access Control Lists (ACL's), but I won't go in to that here.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 11 '13 at 0:26









            David Purdue

            1,897714




            1,897714












            • Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
              – SSH
              Dec 11 '13 at 1:09










            • He could do chmod o+w . - which would let anyone put files in his directory.
              – David Purdue
              Dec 11 '13 at 13:16


















            • Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
              – SSH
              Dec 11 '13 at 1:09










            • He could do chmod o+w . - which would let anyone put files in his directory.
              – David Purdue
              Dec 11 '13 at 13:16
















            Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
            – SSH
            Dec 11 '13 at 1:09




            Thanks David. We all have sudo access to that machine. But is it necessary to create a group? Can user2 gives me access to copy the files by logging into his acccount from putty using some chmod command?
            – SSH
            Dec 11 '13 at 1:09












            He could do chmod o+w . - which would let anyone put files in his directory.
            – David Purdue
            Dec 11 '13 at 13:16




            He could do chmod o+w . - which would let anyone put files in his directory.
            – David Purdue
            Dec 11 '13 at 13:16













            0
















            Have you tried changing the owner rights of the file you need to copy to the user2 folder?
            chown user1:user1 file.ext

            after that you could change the r/w/x/ rights on that file.
            chmod 0755 file.ext



            Another way you could look into are the group memberships.

            The created users, have their own groups?

            If you are using gnome/unity, you could take a look at the users and groups management tool
            users-admin from a terminal window Ctrl+Alt+t. If you don't have this tool installed enter the next command in a terminal window.
            sudo apt-get install gnome-system-tools, this will install the tool users-admin.

            With this tool you can grant user1 acces rights in user2 and/or user2 group, and vice versa for user2 and user3.
            Another thing comes to mind, take a closer look to ssh/scp/winscp group and/or usage rights for the user1, user2, user3 account.






            share|improve this answer


























              0
















              Have you tried changing the owner rights of the file you need to copy to the user2 folder?
              chown user1:user1 file.ext

              after that you could change the r/w/x/ rights on that file.
              chmod 0755 file.ext



              Another way you could look into are the group memberships.

              The created users, have their own groups?

              If you are using gnome/unity, you could take a look at the users and groups management tool
              users-admin from a terminal window Ctrl+Alt+t. If you don't have this tool installed enter the next command in a terminal window.
              sudo apt-get install gnome-system-tools, this will install the tool users-admin.

              With this tool you can grant user1 acces rights in user2 and/or user2 group, and vice versa for user2 and user3.
              Another thing comes to mind, take a closer look to ssh/scp/winscp group and/or usage rights for the user1, user2, user3 account.






              share|improve this answer
























                0












                0








                0








                Have you tried changing the owner rights of the file you need to copy to the user2 folder?
                chown user1:user1 file.ext

                after that you could change the r/w/x/ rights on that file.
                chmod 0755 file.ext



                Another way you could look into are the group memberships.

                The created users, have their own groups?

                If you are using gnome/unity, you could take a look at the users and groups management tool
                users-admin from a terminal window Ctrl+Alt+t. If you don't have this tool installed enter the next command in a terminal window.
                sudo apt-get install gnome-system-tools, this will install the tool users-admin.

                With this tool you can grant user1 acces rights in user2 and/or user2 group, and vice versa for user2 and user3.
                Another thing comes to mind, take a closer look to ssh/scp/winscp group and/or usage rights for the user1, user2, user3 account.






                share|improve this answer














                Have you tried changing the owner rights of the file you need to copy to the user2 folder?
                chown user1:user1 file.ext

                after that you could change the r/w/x/ rights on that file.
                chmod 0755 file.ext



                Another way you could look into are the group memberships.

                The created users, have their own groups?

                If you are using gnome/unity, you could take a look at the users and groups management tool
                users-admin from a terminal window Ctrl+Alt+t. If you don't have this tool installed enter the next command in a terminal window.
                sudo apt-get install gnome-system-tools, this will install the tool users-admin.

                With this tool you can grant user1 acces rights in user2 and/or user2 group, and vice versa for user2 and user3.
                Another thing comes to mind, take a closer look to ssh/scp/winscp group and/or usage rights for the user1, user2, user3 account.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 11 '13 at 12:40









                C Schilder

                1537




                1537






























                    draft saved

                    draft discarded




















































                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2faskubuntu.com%2fquestions%2f388960%2fpermission-denied-error-while-copying-the-files-to-another-user-directory-using%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

                    Questions related to Moebius Transform of Characteristic Function of the Primes

                    List of scandals in India

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?