How to transfer files to mounted disk with sftp?My new hard drive won't automount on bootHow to rebuild fstab...

Can you pop microwave popcorn on a stove?

Owner keeps cutting corners and poaching workers for his other company

Hidden fifths between tenor and soprano in Tchaikovsky's "Guide to harmony"

Return only the number of paired values in array javascript

is it possible to change a material depending on whether it is intersecting with another object?

Bashrc file opens up continuously

What precisely does the commonly reported network hash rate refer to?

Why would an AC motor heavily shake when driven with certain frequencies?

How strong is aircraft-grade spruce?

Why does 8 bit truecolor use only 2 bits for blue?

Are professors obligated to accept supervisory role? If not, how does it work?

Is mountain bike good for long distances?

How to improvise or make pot grip / pot handle

Colorize specific region in plane

Why does PAUSE key have a long make code and no break code?

What can we do about our 9-month-old putting fingers down his throat?

Why would an airport be depicted with symbology for runways longer than 8,069 feet even though it is reported on the sectional as 7,200 feet?

Why does low tire pressure decrease fuel economy?

What happens when a file that is 100% paged in to the page cache gets modified by another process

After a few interviews, What should I do after told to wait?

How to run NPCs with complicated mechanics?

How do English-speaking kids loudly request something?

More than three domains hosted on the same IP address

I won a car in a poker game. How is that taxed in Canada?



How to transfer files to mounted disk with sftp?


My new hard drive won't automount on bootHow to rebuild fstab automaticallyFile Transfer mode in sftpHow to use fsck in Ubuntu?after 16.04 upgrade - will not boot without external drive attachedstoring data on second HDD, mountingRead/Write permission of 2nd hard drive






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







2















So i mounted an external HDD to /media/data and now I am trying to use th SFTP protocol to transfer files on the external disk.



Yet anything I try ends up with permission denied error:



Connected to 192.168.1.14.
sftp> cd /media/data/
sftp> put Test.txt
Uploading Test.txt to /media/data/Mitja/Test.txt
remote open("/media/data/Test.txt"): Permission denied


Any ideas what can I do?



EDIT:
My mount command /etc/fstab is:



proc            /proc           proc    defaults          0       0
PARTUUID=e20a628d-01 /boot vfat defaults 0 2
PARTUUID=e20a628d-02 / ext4 defaults,noatime 0 1
UUID=A2DE-E78C /media/data auto rw,defaults,gid=33,uid=33,umask=0027 0 1


And for the purpose of testing I am using "pi" user to sftp.










share|improve this question









New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • @user68186 Edited my OP.

    – skrat
    8 hours ago






  • 2





    Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

    – Thomas Ward
    8 hours ago











  • @ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

    – skrat
    7 hours ago











  • @skrat are you using Ubuntu or Raspbian?

    – Thomas Ward
    7 hours ago






  • 1





    Raspbian Buster Lite

    – skrat
    7 hours ago


















2















So i mounted an external HDD to /media/data and now I am trying to use th SFTP protocol to transfer files on the external disk.



Yet anything I try ends up with permission denied error:



Connected to 192.168.1.14.
sftp> cd /media/data/
sftp> put Test.txt
Uploading Test.txt to /media/data/Mitja/Test.txt
remote open("/media/data/Test.txt"): Permission denied


Any ideas what can I do?



EDIT:
My mount command /etc/fstab is:



proc            /proc           proc    defaults          0       0
PARTUUID=e20a628d-01 /boot vfat defaults 0 2
PARTUUID=e20a628d-02 / ext4 defaults,noatime 0 1
UUID=A2DE-E78C /media/data auto rw,defaults,gid=33,uid=33,umask=0027 0 1


And for the purpose of testing I am using "pi" user to sftp.










share|improve this question









New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • @user68186 Edited my OP.

    – skrat
    8 hours ago






  • 2





    Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

    – Thomas Ward
    8 hours ago











  • @ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

    – skrat
    7 hours ago











  • @skrat are you using Ubuntu or Raspbian?

    – Thomas Ward
    7 hours ago






  • 1





    Raspbian Buster Lite

    – skrat
    7 hours ago














2












2








2








So i mounted an external HDD to /media/data and now I am trying to use th SFTP protocol to transfer files on the external disk.



Yet anything I try ends up with permission denied error:



Connected to 192.168.1.14.
sftp> cd /media/data/
sftp> put Test.txt
Uploading Test.txt to /media/data/Mitja/Test.txt
remote open("/media/data/Test.txt"): Permission denied


Any ideas what can I do?



EDIT:
My mount command /etc/fstab is:



proc            /proc           proc    defaults          0       0
PARTUUID=e20a628d-01 /boot vfat defaults 0 2
PARTUUID=e20a628d-02 / ext4 defaults,noatime 0 1
UUID=A2DE-E78C /media/data auto rw,defaults,gid=33,uid=33,umask=0027 0 1


And for the purpose of testing I am using "pi" user to sftp.










share|improve this question









New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











So i mounted an external HDD to /media/data and now I am trying to use th SFTP protocol to transfer files on the external disk.



Yet anything I try ends up with permission denied error:



Connected to 192.168.1.14.
sftp> cd /media/data/
sftp> put Test.txt
Uploading Test.txt to /media/data/Mitja/Test.txt
remote open("/media/data/Test.txt"): Permission denied


Any ideas what can I do?



EDIT:
My mount command /etc/fstab is:



proc            /proc           proc    defaults          0       0
PARTUUID=e20a628d-01 /boot vfat defaults 0 2
PARTUUID=e20a628d-02 / ext4 defaults,noatime 0 1
UUID=A2DE-E78C /media/data auto rw,defaults,gid=33,uid=33,umask=0027 0 1


And for the purpose of testing I am using "pi" user to sftp.







permissions mount ssh hard-drive sftp






share|improve this question









New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 8 hours ago







skrat













New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









skratskrat

1134 bronze badges




1134 bronze badges




New contributor



skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




skrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • @user68186 Edited my OP.

    – skrat
    8 hours ago






  • 2





    Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

    – Thomas Ward
    8 hours ago











  • @ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

    – skrat
    7 hours ago











  • @skrat are you using Ubuntu or Raspbian?

    – Thomas Ward
    7 hours ago






  • 1





    Raspbian Buster Lite

    – skrat
    7 hours ago



















  • @user68186 Edited my OP.

    – skrat
    8 hours ago






  • 2





    Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

    – Thomas Ward
    8 hours ago











  • @ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

    – skrat
    7 hours ago











  • @skrat are you using Ubuntu or Raspbian?

    – Thomas Ward
    7 hours ago






  • 1





    Raspbian Buster Lite

    – skrat
    7 hours ago

















@user68186 Edited my OP.

– skrat
8 hours ago





@user68186 Edited my OP.

– skrat
8 hours ago




2




2





Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

– Thomas Ward
8 hours ago





Are you 100% sure that the 'pi' user is gid=33, uid=33? "No permission to access" a location is usually tied specifically to userids and how things're mounted.

– Thomas Ward
8 hours ago













@ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

– skrat
7 hours ago





@ThomasWard You are correct, it was not 33. Instead gid=1000, uid=1000. And that actually solves the problem. Can you please post an answer so I can accept it? Thanks!

– skrat
7 hours ago













@skrat are you using Ubuntu or Raspbian?

– Thomas Ward
7 hours ago





@skrat are you using Ubuntu or Raspbian?

– Thomas Ward
7 hours ago




1




1





Raspbian Buster Lite

– skrat
7 hours ago





Raspbian Buster Lite

– skrat
7 hours ago










1 Answer
1






active

oldest

votes


















2
















The problem is you are using wrong UID and GID entries.



As you indicated, your user pi is using group ID 1000 and user ID 1000. Update your mount point as follows in your fstab:



UUID=A2DE-E78C /media/data auto rw,defaults,gid=1000,uid=1000,umask=0027 0 1





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/4.0/"u003ecc by-sa 4.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
    });


    }
    });







    skrat is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded
















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1171601%2fhow-to-transfer-files-to-mounted-disk-with-sftp%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









    2
















    The problem is you are using wrong UID and GID entries.



    As you indicated, your user pi is using group ID 1000 and user ID 1000. Update your mount point as follows in your fstab:



    UUID=A2DE-E78C /media/data auto rw,defaults,gid=1000,uid=1000,umask=0027 0 1





    share|improve this answer






























      2
















      The problem is you are using wrong UID and GID entries.



      As you indicated, your user pi is using group ID 1000 and user ID 1000. Update your mount point as follows in your fstab:



      UUID=A2DE-E78C /media/data auto rw,defaults,gid=1000,uid=1000,umask=0027 0 1





      share|improve this answer




























        2














        2










        2









        The problem is you are using wrong UID and GID entries.



        As you indicated, your user pi is using group ID 1000 and user ID 1000. Update your mount point as follows in your fstab:



        UUID=A2DE-E78C /media/data auto rw,defaults,gid=1000,uid=1000,umask=0027 0 1





        share|improve this answer













        The problem is you are using wrong UID and GID entries.



        As you indicated, your user pi is using group ID 1000 and user ID 1000. Update your mount point as follows in your fstab:



        UUID=A2DE-E78C /media/data auto rw,defaults,gid=1000,uid=1000,umask=0027 0 1






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        Thomas WardThomas Ward

        47.9k23 gold badges128 silver badges185 bronze badges




        47.9k23 gold badges128 silver badges185 bronze badges


























            skrat is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded

















            skrat is a new contributor. Be nice, and check out our Code of Conduct.













            skrat is a new contributor. Be nice, and check out our Code of Conduct.












            skrat is a new contributor. Be nice, and check out our Code of Conduct.
















            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1171601%2fhow-to-transfer-files-to-mounted-disk-with-sftp%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m