Acecssing NFS share without root privileges

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











up vote
3
down vote

favorite












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

























    up vote
    3
    down vote

    favorite












    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























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      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?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 25 at 11:53









      Jeff Schaller

      30.8k846104




      30.8k846104









      asked Jun 25 at 11:17









      Forivin

      178110




      178110




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          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 at 7:56










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          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 at 7:56














          up vote
          1
          down vote













          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 at 7:56












          up vote
          1
          down vote










          up vote
          1
          down vote









          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 at 22:40









          slm♦

          233k65479652




          233k65479652











          • 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 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 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 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 at 7:56












           

          draft saved


          draft discarded


























           


          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













































































          Popular posts from this blog

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

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?