Mounting volume/partition with permissions for user

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











up vote
0
down vote

favorite












A volume intended for use by my user was created at OS installation with root ownership and my user lacks write permissions.



Some solutions I've read about include:



  • changing ownership of the mount point with chown

  • adding group write permissions with chmod

  • adding user or users mount option in /etc/fstab.

What is the best practice for this situation, and what are the implications of each approach?







share|improve this question























    up vote
    0
    down vote

    favorite












    A volume intended for use by my user was created at OS installation with root ownership and my user lacks write permissions.



    Some solutions I've read about include:



    • changing ownership of the mount point with chown

    • adding group write permissions with chmod

    • adding user or users mount option in /etc/fstab.

    What is the best practice for this situation, and what are the implications of each approach?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      A volume intended for use by my user was created at OS installation with root ownership and my user lacks write permissions.



      Some solutions I've read about include:



      • changing ownership of the mount point with chown

      • adding group write permissions with chmod

      • adding user or users mount option in /etc/fstab.

      What is the best practice for this situation, and what are the implications of each approach?







      share|improve this question











      A volume intended for use by my user was created at OS installation with root ownership and my user lacks write permissions.



      Some solutions I've read about include:



      • changing ownership of the mount point with chown

      • adding group write permissions with chmod

      • adding user or users mount option in /etc/fstab.

      What is the best practice for this situation, and what are the implications of each approach?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jul 12 at 18:53









      adatum

      557




      557




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          If it's in /etc/fstab then it will mount at boot. As only root has write permissions then you you'll need to modify it so that the user has those permissions. The best way is:



          chown -R user /mnt/point


          If the root group has write permission as well and you want another group to have it then you can use:



          chown -R user:group /mnt/point


          If the root group doesn't have write access, then you can use chmod next:



          chmod -R 775 /mnt/point


          That will give write permission to the group if it's not there and read and execute to everyone else. You can modify the 775 to give whatever permissions you want to everyone else as that will be specified by the third number.



          To better cover what you asked in your comment below:



          You can add the user option to /etc/fstab but that only allows the file system to be mounted by any user. It won't change the permissions on the file system which is why you need chown and/or chmod. You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted.



          For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.






          share|improve this answer























          • The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
            – adatum
            Jul 13 at 2:24










          • @adatum See my update.
            – Nasir Riley
            Jul 13 at 6:23










          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%2f454962%2fmounting-volume-partition-with-permissions-for-user%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
          0
          down vote



          accepted










          If it's in /etc/fstab then it will mount at boot. As only root has write permissions then you you'll need to modify it so that the user has those permissions. The best way is:



          chown -R user /mnt/point


          If the root group has write permission as well and you want another group to have it then you can use:



          chown -R user:group /mnt/point


          If the root group doesn't have write access, then you can use chmod next:



          chmod -R 775 /mnt/point


          That will give write permission to the group if it's not there and read and execute to everyone else. You can modify the 775 to give whatever permissions you want to everyone else as that will be specified by the third number.



          To better cover what you asked in your comment below:



          You can add the user option to /etc/fstab but that only allows the file system to be mounted by any user. It won't change the permissions on the file system which is why you need chown and/or chmod. You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted.



          For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.






          share|improve this answer























          • The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
            – adatum
            Jul 13 at 2:24










          • @adatum See my update.
            – Nasir Riley
            Jul 13 at 6:23














          up vote
          0
          down vote



          accepted










          If it's in /etc/fstab then it will mount at boot. As only root has write permissions then you you'll need to modify it so that the user has those permissions. The best way is:



          chown -R user /mnt/point


          If the root group has write permission as well and you want another group to have it then you can use:



          chown -R user:group /mnt/point


          If the root group doesn't have write access, then you can use chmod next:



          chmod -R 775 /mnt/point


          That will give write permission to the group if it's not there and read and execute to everyone else. You can modify the 775 to give whatever permissions you want to everyone else as that will be specified by the third number.



          To better cover what you asked in your comment below:



          You can add the user option to /etc/fstab but that only allows the file system to be mounted by any user. It won't change the permissions on the file system which is why you need chown and/or chmod. You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted.



          For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.






          share|improve this answer























          • The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
            – adatum
            Jul 13 at 2:24










          • @adatum See my update.
            – Nasir Riley
            Jul 13 at 6:23












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          If it's in /etc/fstab then it will mount at boot. As only root has write permissions then you you'll need to modify it so that the user has those permissions. The best way is:



          chown -R user /mnt/point


          If the root group has write permission as well and you want another group to have it then you can use:



          chown -R user:group /mnt/point


          If the root group doesn't have write access, then you can use chmod next:



          chmod -R 775 /mnt/point


          That will give write permission to the group if it's not there and read and execute to everyone else. You can modify the 775 to give whatever permissions you want to everyone else as that will be specified by the third number.



          To better cover what you asked in your comment below:



          You can add the user option to /etc/fstab but that only allows the file system to be mounted by any user. It won't change the permissions on the file system which is why you need chown and/or chmod. You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted.



          For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.






          share|improve this answer















          If it's in /etc/fstab then it will mount at boot. As only root has write permissions then you you'll need to modify it so that the user has those permissions. The best way is:



          chown -R user /mnt/point


          If the root group has write permission as well and you want another group to have it then you can use:



          chown -R user:group /mnt/point


          If the root group doesn't have write access, then you can use chmod next:



          chmod -R 775 /mnt/point


          That will give write permission to the group if it's not there and read and execute to everyone else. You can modify the 775 to give whatever permissions you want to everyone else as that will be specified by the third number.



          To better cover what you asked in your comment below:



          You can add the user option to /etc/fstab but that only allows the file system to be mounted by any user. It won't change the permissions on the file system which is why you need chown and/or chmod. You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted.



          For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Jul 15 at 5:58


























          answered Jul 12 at 23:00









          Nasir Riley

          1,484138




          1,484138











          • The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
            – adatum
            Jul 13 at 2:24










          • @adatum See my update.
            – Nasir Riley
            Jul 13 at 6:23
















          • The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
            – adatum
            Jul 13 at 2:24










          • @adatum See my update.
            – Nasir Riley
            Jul 13 at 6:23















          The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
          – adatum
          Jul 13 at 2:24




          The chown approach works, but requires authentication to mount (if unmounted after boot). I presume adding user or users to the fstab mount options would allow user mounting without authentication? What are the practicality and security considerations of each approach?
          – adatum
          Jul 13 at 2:24












          @adatum See my update.
          – Nasir Riley
          Jul 13 at 6:23




          @adatum See my update.
          – Nasir Riley
          Jul 13 at 6:23












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454962%2fmounting-volume-partition-with-permissions-for-user%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          The Forum (Inglewood, California)

          Palaiologos