Acecssing NFS share without root privilegesCan I export an NFS share with faked root privilegesWhy does mount...

Is it ok for women to use creatine supplement?

What does "Marchentalender" on the front of a postcard mean?

Is this story about US tax office reasonable?

How can I find where certain bash function is defined?

Black-and-white film where monster/alien gets fried

Crossword gone overboard

Question about exercise 11.5 in TeXbook

What caused the tendency for conservatives to not support climate change reform?

How to extract lower and upper bound in numeric format from a confidence interval string?

Apparent Ring of Craters on the Moon

Why does the UK have more political parties than the US?

Simple linked list with two iterators

What is the 中 in ダウンロード中?

If a person had control of every single cell of their body, would they be able to transform into another creature?

What is the most important source of natural gas? coal, oil or other?

How do you deal with an abrupt change in personality for a protagonist?

Why colon to denote that a value belongs to a type?

Comment dit-on « I’ll tell you what » ?

Where did the “Vikings wear helmets with horn” stereotype come from and why?

Different PCB color ( is it different material? )

Ticket sales for Queen at the Live Aid

File globbing pattern, !(*example), behaves differently in bash script than it does in bash shell

What does the behaviour of water on the skin of an aircraft in flight tell us?

How do I subvert the tropes of a train heist?



Acecssing NFS share without root privileges


Can I export an NFS share with faked root privilegesWhy does mount require root privileges?Unable to get rid of root user and privilegesWhy does Docker need root privileges?Do root's supplementary groups behave differently than regular account ones for NFS shares?Prevent certain lines of a script to run as rootWhy does reboot and poweroff require root privileges?Is it possible to retain the union of user privileges and root privileges when using sudo?How to fix ”mount.nfs: access denied …“ when trying to mount a NFS share exported by a Proxmox 5 machine?How to allow specific Proxmox LXC containers to mount NFS shares on the network?






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







4















I want to access an NFS share from within a Docker container. I don't have control over how that Docker container is started, so I can't run it in privileged mode etc. But honestly, I don't even want to run it in privileged mode because that is a completely unnecessary security risk.



It's a shame that the standard utility mount always requires root privileges. In my opinion a non-root user should simply be allowed to mount to whatever locations that user has permissions for. Is there an alternative tool that would allow me to access that NFS share without root privileges?










share|improve this question































    4















    I want to access an NFS share from within a Docker container. I don't have control over how that Docker container is started, so I can't run it in privileged mode etc. But honestly, I don't even want to run it in privileged mode because that is a completely unnecessary security risk.



    It's a shame that the standard utility mount always requires root privileges. In my opinion a non-root user should simply be allowed to mount to whatever locations that user has permissions for. Is there an alternative tool that would allow me to access that NFS share without root privileges?










    share|improve this question



























      4












      4








      4








      I want to access an NFS share from within a Docker container. I don't have control over how that Docker container is started, so I can't run it in privileged mode etc. But honestly, I don't even want to run it in privileged mode because that is a completely unnecessary security risk.



      It's a shame that the standard utility mount always requires root privileges. In my opinion a non-root user should simply be allowed to mount to whatever locations that user has permissions for. Is there an alternative tool that would allow me to access that NFS share without root privileges?










      share|improve this question
















      I want to access an NFS share from within a Docker container. I don't have control over how that Docker container is started, so I can't run it in privileged mode etc. But honestly, I don't even want to run it in privileged mode because that is a completely unnecessary security risk.



      It's a shame that the standard utility mount always requires root privileges. In my opinion a non-root user should simply be allowed to mount to whatever locations that user has permissions for. Is there an alternative tool that would allow me to access that NFS share without root privileges?







      linux root nfs docker






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 25 '18 at 11:53









      Jeff Schaller

      45.9k1165150




      45.9k1165150










      asked Jun 25 '18 at 11:17









      ForivinForivin

      215417




      215417






















          2 Answers
          2






          active

          oldest

          votes


















          2














          This isn't possible without having root access to either execute the mount command or the ability to install additional software within the container, again you'd need root/sudo access to do this.



          The closest you can get to something that might be usable here for you would be to setup the NFS entry within the container's /etc/fstab file with the user option, so that non-root users could mount it.



          $ cat /etc/fstab
          10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0


          References




          • http://xmodulo.com/how-to-mount-nfs-share-as-regular-user.html






          share|improve this answer
























          • I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

            – Forivin
            Jun 26 '18 at 7:56



















          0














          Inside the server machine you need to create a folder with the "Others" group having write access.



          I'm still figuring out how to force NFS to force an umask for every new file that you create on that share, but that should get you started.






          share|improve this answer








          New contributor



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




















            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%2f451742%2facecssing-nfs-share-without-root-privileges%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









            2














            This isn't possible without having root access to either execute the mount command or the ability to install additional software within the container, again you'd need root/sudo access to do this.



            The closest you can get to something that might be usable here for you would be to setup the NFS entry within the container's /etc/fstab file with the user option, so that non-root users could mount it.



            $ cat /etc/fstab
            10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0


            References




            • http://xmodulo.com/how-to-mount-nfs-share-as-regular-user.html






            share|improve this answer
























            • I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

              – Forivin
              Jun 26 '18 at 7:56
















            2














            This isn't possible without having root access to either execute the mount command or the ability to install additional software within the container, again you'd need root/sudo access to do this.



            The closest you can get to something that might be usable here for you would be to setup the NFS entry within the container's /etc/fstab file with the user option, so that non-root users could mount it.



            $ cat /etc/fstab
            10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0


            References




            • http://xmodulo.com/how-to-mount-nfs-share-as-regular-user.html






            share|improve this answer
























            • I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

              – Forivin
              Jun 26 '18 at 7:56














            2












            2








            2







            This isn't possible without having root access to either execute the mount command or the ability to install additional software within the container, again you'd need root/sudo access to do this.



            The closest you can get to something that might be usable here for you would be to setup the NFS entry within the container's /etc/fstab file with the user option, so that non-root users could mount it.



            $ cat /etc/fstab
            10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0


            References




            • http://xmodulo.com/how-to-mount-nfs-share-as-regular-user.html






            share|improve this answer













            This isn't possible without having root access to either execute the mount command or the ability to install additional software within the container, again you'd need root/sudo access to do this.



            The closest you can get to something that might be usable here for you would be to setup the NFS entry within the container's /etc/fstab file with the user option, so that non-root users could mount it.



            $ cat /etc/fstab
            10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0


            References




            • http://xmodulo.com/how-to-mount-nfs-share-as-regular-user.html







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jun 25 '18 at 22:40









            slmslm

            259k72556704




            259k72556704













            • I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

              – Forivin
              Jun 26 '18 at 7:56



















            • I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

              – Forivin
              Jun 26 '18 at 7:56

















            I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

            – Forivin
            Jun 26 '18 at 7:56





            I think it is possible. It's just not possible with the mount utility. And btw you can install additional software without root privileged in Linux. Besides that inside the Docker container you have root privileges to a certain degree. From what I understand changing the /etc/fstab of the container won't have an effect.

            – Forivin
            Jun 26 '18 at 7:56













            0














            Inside the server machine you need to create a folder with the "Others" group having write access.



            I'm still figuring out how to force NFS to force an umask for every new file that you create on that share, but that should get you started.






            share|improve this answer








            New contributor



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
























              0














              Inside the server machine you need to create a folder with the "Others" group having write access.



              I'm still figuring out how to force NFS to force an umask for every new file that you create on that share, but that should get you started.






              share|improve this answer








              New contributor



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






















                0












                0








                0







                Inside the server machine you need to create a folder with the "Others" group having write access.



                I'm still figuring out how to force NFS to force an umask for every new file that you create on that share, but that should get you started.






                share|improve this answer








                New contributor



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









                Inside the server machine you need to create a folder with the "Others" group having write access.



                I'm still figuring out how to force NFS to force an umask for every new file that you create on that share, but that should get you started.







                share|improve this answer








                New contributor



                Managor 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 answer



                share|improve this answer






                New contributor



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








                answered 1 hour ago









                ManagorManagor

                1




                1




                New contributor



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




                New contributor




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
































                    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%2f451742%2facecssing-nfs-share-without-root-privileges%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