cifs mounting all files as root owner





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







3















I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root



If i sudo i can copy files back and forth but its read only if I dont.



sudo chown [standard_user] *
on the mounted share does nothing.



This mounts the share as read only (all files are root)
sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw



On the win7 box I have myuser and everyone as 'full control'



how do I mount this share so that I dont have to be root to delete/move files?










share|improve this question





























    3















    I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root



    If i sudo i can copy files back and forth but its read only if I dont.



    sudo chown [standard_user] *
    on the mounted share does nothing.



    This mounts the share as read only (all files are root)
    sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw



    On the win7 box I have myuser and everyone as 'full control'



    how do I mount this share so that I dont have to be root to delete/move files?










    share|improve this question

























      3












      3








      3


      2






      I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root



      If i sudo i can copy files back and forth but its read only if I dont.



      sudo chown [standard_user] *
      on the mounted share does nothing.



      This mounts the share as read only (all files are root)
      sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw



      On the win7 box I have myuser and everyone as 'full control'



      how do I mount this share so that I dont have to be root to delete/move files?










      share|improve this question














      I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root



      If i sudo i can copy files back and forth but its read only if I dont.



      sudo chown [standard_user] *
      on the mounted share does nothing.



      This mounts the share as read only (all files are root)
      sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw



      On the win7 box I have myuser and everyone as 'full control'



      how do I mount this share so that I dont have to be root to delete/move files?







      cifs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 '17 at 17:04









      flashc5flashc5

      1814




      1814






















          3 Answers
          3






          active

          oldest

          votes


















          1














          Try the following. Works fine for me.



          sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/





          share|improve this answer































            8














            mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users





            share|improve this answer
























            • If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

              – Arronical
              Mar 7 '17 at 17:16











            • i alsways do, it makes you wait so many minutes before you can mark it as the answer

              – flashc5
              Mar 7 '17 at 17:25











            • This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

              – Rogier Lommers
              Sep 10 '18 at 18:34











            • @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

              – Bruni
              Sep 11 '18 at 6:27



















            0














            You have to make sure the mounting target is owned by the user/group first.



            sudo chown myusername:mygroupname /mymount/





            share|improve this answer
























            • while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

              – j-money
              Mar 27 at 10:23














            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%2f890579%2fcifs-mounting-all-files-as-root-owner%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Try the following. Works fine for me.



            sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/





            share|improve this answer




























              1














              Try the following. Works fine for me.



              sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/





              share|improve this answer


























                1












                1








                1







                Try the following. Works fine for me.



                sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/





                share|improve this answer













                Try the following. Works fine for me.



                sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 29 '17 at 22:26









                matson kepsonmatson kepson

                1262




                1262

























                    8














                    mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users





                    share|improve this answer
























                    • If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                      – Arronical
                      Mar 7 '17 at 17:16











                    • i alsways do, it makes you wait so many minutes before you can mark it as the answer

                      – flashc5
                      Mar 7 '17 at 17:25











                    • This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                      – Rogier Lommers
                      Sep 10 '18 at 18:34











                    • @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                      – Bruni
                      Sep 11 '18 at 6:27
















                    8














                    mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users





                    share|improve this answer
























                    • If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                      – Arronical
                      Mar 7 '17 at 17:16











                    • i alsways do, it makes you wait so many minutes before you can mark it as the answer

                      – flashc5
                      Mar 7 '17 at 17:25











                    • This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                      – Rogier Lommers
                      Sep 10 '18 at 18:34











                    • @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                      – Bruni
                      Sep 11 '18 at 6:27














                    8












                    8








                    8







                    mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users





                    share|improve this answer













                    mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 7 '17 at 17:07









                    BruniBruni

                    5,19142656




                    5,19142656













                    • If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                      – Arronical
                      Mar 7 '17 at 17:16











                    • i alsways do, it makes you wait so many minutes before you can mark it as the answer

                      – flashc5
                      Mar 7 '17 at 17:25











                    • This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                      – Rogier Lommers
                      Sep 10 '18 at 18:34











                    • @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                      – Bruni
                      Sep 11 '18 at 6:27



















                    • If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                      – Arronical
                      Mar 7 '17 at 17:16











                    • i alsways do, it makes you wait so many minutes before you can mark it as the answer

                      – flashc5
                      Mar 7 '17 at 17:25











                    • This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                      – Rogier Lommers
                      Sep 10 '18 at 18:34











                    • @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                      – Bruni
                      Sep 11 '18 at 6:27

















                    If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                    – Arronical
                    Mar 7 '17 at 17:16





                    If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!

                    – Arronical
                    Mar 7 '17 at 17:16













                    i alsways do, it makes you wait so many minutes before you can mark it as the answer

                    – flashc5
                    Mar 7 '17 at 17:25





                    i alsways do, it makes you wait so many minutes before you can mark it as the answer

                    – flashc5
                    Mar 7 '17 at 17:25













                    This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                    – Rogier Lommers
                    Sep 10 '18 at 18:34





                    This worked, but all the files created through the mount are now -rwxrwxrwx. Is there a way to change this?

                    – Rogier Lommers
                    Sep 10 '18 at 18:34













                    @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                    – Bruni
                    Sep 11 '18 at 6:27





                    @RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).

                    – Bruni
                    Sep 11 '18 at 6:27











                    0














                    You have to make sure the mounting target is owned by the user/group first.



                    sudo chown myusername:mygroupname /mymount/





                    share|improve this answer
























                    • while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                      – j-money
                      Mar 27 at 10:23


















                    0














                    You have to make sure the mounting target is owned by the user/group first.



                    sudo chown myusername:mygroupname /mymount/





                    share|improve this answer
























                    • while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                      – j-money
                      Mar 27 at 10:23
















                    0












                    0








                    0







                    You have to make sure the mounting target is owned by the user/group first.



                    sudo chown myusername:mygroupname /mymount/





                    share|improve this answer













                    You have to make sure the mounting target is owned by the user/group first.



                    sudo chown myusername:mygroupname /mymount/






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 27 at 1:22









                    ImMartianImMartian

                    1




                    1













                    • while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                      – j-money
                      Mar 27 at 10:23





















                    • while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                      – j-money
                      Mar 27 at 10:23



















                    while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                    – j-money
                    Mar 27 at 10:23







                    while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing

                    – j-money
                    Mar 27 at 10:23




















                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f890579%2fcifs-mounting-all-files-as-root-owner%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

                    Category:香港粉麵

                    List *all* the tuples!

                    Channel [V]