How can I automatically set write permissions on mounting a usb drive in linux?












17















When I mount an external usb drive on linux (CentOs4), the permissions are by default set to read-only. Since there are multiple users on the computer who need to use the external drive, I want everybody to have rw permission for the entire drive. I also want them to be able to mount the drive if the computer has accidentially been shut down. They can use sudo mount to mount the drive, but this will only give them read permission, and I obviously don't want to allow sudo chmod.



Is there a default setting that I can change so that every new external usb disk automatically gets rw permissions?










share|improve this question





























    17















    When I mount an external usb drive on linux (CentOs4), the permissions are by default set to read-only. Since there are multiple users on the computer who need to use the external drive, I want everybody to have rw permission for the entire drive. I also want them to be able to mount the drive if the computer has accidentially been shut down. They can use sudo mount to mount the drive, but this will only give them read permission, and I obviously don't want to allow sudo chmod.



    Is there a default setting that I can change so that every new external usb disk automatically gets rw permissions?










    share|improve this question



























      17












      17








      17


      6






      When I mount an external usb drive on linux (CentOs4), the permissions are by default set to read-only. Since there are multiple users on the computer who need to use the external drive, I want everybody to have rw permission for the entire drive. I also want them to be able to mount the drive if the computer has accidentially been shut down. They can use sudo mount to mount the drive, but this will only give them read permission, and I obviously don't want to allow sudo chmod.



      Is there a default setting that I can change so that every new external usb disk automatically gets rw permissions?










      share|improve this question
















      When I mount an external usb drive on linux (CentOs4), the permissions are by default set to read-only. Since there are multiple users on the computer who need to use the external drive, I want everybody to have rw permission for the entire drive. I also want them to be able to mount the drive if the computer has accidentially been shut down. They can use sudo mount to mount the drive, but this will only give them read permission, and I obviously don't want to allow sudo chmod.



      Is there a default setting that I can change so that every new external usb disk automatically gets rw permissions?







      linux usb permissions usb-flash-drive mount






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 15 '10 at 2:46









      studiohack

      11.3k1880114




      11.3k1880114










      asked Aug 15 '10 at 2:35









      JonasJonas

      3974820




      3974820






















          3 Answers
          3






          active

          oldest

          votes


















          17














          To enable everyone rw access, the key is umask=0 option to mount command.



          sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere


          umask=0 is enough, uid and gid just for sake of clarity, so you don't see more 'root' owners than necessarily.





          @Tom's answer (writing /etc/fstab entry) will allow you to skip sudo and if you write umask=0 as additional option there, you'll get best of both worlds:



          Having this in /etc/fstab:



          /dev/something /mnt/somewhere auto users,noatime,umask=0 0 0


          allows you to just run



          mount /dev/something


          and everyone has access to all files.





          Here's technical note, if you wish to know details:



          As man mount says, 'umask=0' will ensure that no additional rules apply to files access mode. For FAT filesystems (which are most widely used on USB disks), there's no access mode stored. But your current process has some umask value set, you can see it if you run just umask in terminal. mount uses that as default and removes access mode of your umask value from all files on mounted disk. Most widely used umask values are (octal) 022 - no group and other write, and 027 - no group write, no any other access.






          share|improve this answer
























          • I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

            – Jonas
            Aug 19 '10 at 14:03






          • 1





            FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

            – Tomislav Nakic-Alfirevic
            Mar 17 '12 at 18:12






          • 2





            Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

            – Nippey
            Oct 19 '12 at 18:54



















          2














          Add an entry to /etc/fstab. Here is an entry that I added just a few hours ago for my Seagate USB drive:



          UUID=4ACC734ECC733375 /media/Linux ext3 errors=remount-ro,defaults,users,noatime,nodiratime 0 0



          The key here is the "users" entry that allows users to mount and unmount the drive.



          Edit: this works for specific drives - I don't know if it can be enabled for all drives with one entry.






          share|improve this answer


























          • If a user mounts the drive, would all other users get rw permission as well?

            – Jonas
            Aug 15 '10 at 4:03



















          1














          Type mount. This will give the current place it is at. Here is my output.



          rick@rick-Main ~ $ mount
          /dev/sda4 on / type ext4 (rw,errors=remount-ro)
          proc on /proc type proc (rw,noexec,nosuid,nodev)
          sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
          none on /sys/fs/cgroup type tmpfs (rw)
          none on /sys/fs/fuse/connections type fusectl (rw)
          none on /sys/kernel/debug type debugfs (rw)
          none on /sys/kernel/security type securityfs (rw)
          udev on /dev type devtmpfs (rw,mode=0755)
          devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
          tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
          none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
          none on /run/shm type tmpfs (rw,nosuid,nodev)
          none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
          none on /sys/fs/pstore type pstore (rw)
          /dev/sda6 on /media/DATA1 type vfat (rw,uid=1000,utf8,umask=077)
          binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
          systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
          gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=rick)
          /dev/sdf1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)


          The last is my usb drive automouunted by Linux Mint.



          Now type



          sudo umount /dev/sdf1


          this will unmount drive



          now remount correctly.



          sudo mount -t vfat /dev/sdf1 /media/usb0 -o rw,users,umask=0





          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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%2fsuperuser.com%2fquestions%2f175987%2fhow-can-i-automatically-set-write-permissions-on-mounting-a-usb-drive-in-linux%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









            17














            To enable everyone rw access, the key is umask=0 option to mount command.



            sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere


            umask=0 is enough, uid and gid just for sake of clarity, so you don't see more 'root' owners than necessarily.





            @Tom's answer (writing /etc/fstab entry) will allow you to skip sudo and if you write umask=0 as additional option there, you'll get best of both worlds:



            Having this in /etc/fstab:



            /dev/something /mnt/somewhere auto users,noatime,umask=0 0 0


            allows you to just run



            mount /dev/something


            and everyone has access to all files.





            Here's technical note, if you wish to know details:



            As man mount says, 'umask=0' will ensure that no additional rules apply to files access mode. For FAT filesystems (which are most widely used on USB disks), there's no access mode stored. But your current process has some umask value set, you can see it if you run just umask in terminal. mount uses that as default and removes access mode of your umask value from all files on mounted disk. Most widely used umask values are (octal) 022 - no group and other write, and 027 - no group write, no any other access.






            share|improve this answer
























            • I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

              – Jonas
              Aug 19 '10 at 14:03






            • 1





              FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

              – Tomislav Nakic-Alfirevic
              Mar 17 '12 at 18:12






            • 2





              Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

              – Nippey
              Oct 19 '12 at 18:54
















            17














            To enable everyone rw access, the key is umask=0 option to mount command.



            sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere


            umask=0 is enough, uid and gid just for sake of clarity, so you don't see more 'root' owners than necessarily.





            @Tom's answer (writing /etc/fstab entry) will allow you to skip sudo and if you write umask=0 as additional option there, you'll get best of both worlds:



            Having this in /etc/fstab:



            /dev/something /mnt/somewhere auto users,noatime,umask=0 0 0


            allows you to just run



            mount /dev/something


            and everyone has access to all files.





            Here's technical note, if you wish to know details:



            As man mount says, 'umask=0' will ensure that no additional rules apply to files access mode. For FAT filesystems (which are most widely used on USB disks), there's no access mode stored. But your current process has some umask value set, you can see it if you run just umask in terminal. mount uses that as default and removes access mode of your umask value from all files on mounted disk. Most widely used umask values are (octal) 022 - no group and other write, and 027 - no group write, no any other access.






            share|improve this answer
























            • I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

              – Jonas
              Aug 19 '10 at 14:03






            • 1





              FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

              – Tomislav Nakic-Alfirevic
              Mar 17 '12 at 18:12






            • 2





              Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

              – Nippey
              Oct 19 '12 at 18:54














            17












            17








            17







            To enable everyone rw access, the key is umask=0 option to mount command.



            sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere


            umask=0 is enough, uid and gid just for sake of clarity, so you don't see more 'root' owners than necessarily.





            @Tom's answer (writing /etc/fstab entry) will allow you to skip sudo and if you write umask=0 as additional option there, you'll get best of both worlds:



            Having this in /etc/fstab:



            /dev/something /mnt/somewhere auto users,noatime,umask=0 0 0


            allows you to just run



            mount /dev/something


            and everyone has access to all files.





            Here's technical note, if you wish to know details:



            As man mount says, 'umask=0' will ensure that no additional rules apply to files access mode. For FAT filesystems (which are most widely used on USB disks), there's no access mode stored. But your current process has some umask value set, you can see it if you run just umask in terminal. mount uses that as default and removes access mode of your umask value from all files on mounted disk. Most widely used umask values are (octal) 022 - no group and other write, and 027 - no group write, no any other access.






            share|improve this answer













            To enable everyone rw access, the key is umask=0 option to mount command.



            sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere


            umask=0 is enough, uid and gid just for sake of clarity, so you don't see more 'root' owners than necessarily.





            @Tom's answer (writing /etc/fstab entry) will allow you to skip sudo and if you write umask=0 as additional option there, you'll get best of both worlds:



            Having this in /etc/fstab:



            /dev/something /mnt/somewhere auto users,noatime,umask=0 0 0


            allows you to just run



            mount /dev/something


            and everyone has access to all files.





            Here's technical note, if you wish to know details:



            As man mount says, 'umask=0' will ensure that no additional rules apply to files access mode. For FAT filesystems (which are most widely used on USB disks), there's no access mode stored. But your current process has some umask value set, you can see it if you run just umask in terminal. mount uses that as default and removes access mode of your umask value from all files on mounted disk. Most widely used umask values are (octal) 022 - no group and other write, and 027 - no group write, no any other access.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 15 '10 at 11:26









            temototemoto

            28315




            28315













            • I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

              – Jonas
              Aug 19 '10 at 14:03






            • 1





              FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

              – Tomislav Nakic-Alfirevic
              Mar 17 '12 at 18:12






            • 2





              Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

              – Nippey
              Oct 19 '12 at 18:54



















            • I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

              – Jonas
              Aug 19 '10 at 14:03






            • 1





              FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

              – Tomislav Nakic-Alfirevic
              Mar 17 '12 at 18:12






            • 2





              Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

              – Nippey
              Oct 19 '12 at 18:54

















            I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

            – Jonas
            Aug 19 '10 at 14:03





            I get an error with 'bad option' if I add umask=0 0 0 as an entry in fstab. Does the umask-entry need to be the last entry? What does the managed=0 0 0 entry do that is currently last?

            – Jonas
            Aug 19 '10 at 14:03




            1




            1





            FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

            – Tomislav Nakic-Alfirevic
            Mar 17 '12 at 18:12





            FWIW, the umask option is a VFAT-only option, i.e. the solution helps as long as the USB memory is uses the VFAT filesystem (which did not happen to be my case).

            – Tomislav Nakic-Alfirevic
            Mar 17 '12 at 18:12




            2




            2





            Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

            – Nippey
            Oct 19 '12 at 18:54





            Thank you. But I had to alter it in order to make it work: sudo mount -o umask=0,uid=nobody /dev/something /mnt/somewhere It only works without setting the gid-parameter.

            – Nippey
            Oct 19 '12 at 18:54













            2














            Add an entry to /etc/fstab. Here is an entry that I added just a few hours ago for my Seagate USB drive:



            UUID=4ACC734ECC733375 /media/Linux ext3 errors=remount-ro,defaults,users,noatime,nodiratime 0 0



            The key here is the "users" entry that allows users to mount and unmount the drive.



            Edit: this works for specific drives - I don't know if it can be enabled for all drives with one entry.






            share|improve this answer


























            • If a user mounts the drive, would all other users get rw permission as well?

              – Jonas
              Aug 15 '10 at 4:03
















            2














            Add an entry to /etc/fstab. Here is an entry that I added just a few hours ago for my Seagate USB drive:



            UUID=4ACC734ECC733375 /media/Linux ext3 errors=remount-ro,defaults,users,noatime,nodiratime 0 0



            The key here is the "users" entry that allows users to mount and unmount the drive.



            Edit: this works for specific drives - I don't know if it can be enabled for all drives with one entry.






            share|improve this answer


























            • If a user mounts the drive, would all other users get rw permission as well?

              – Jonas
              Aug 15 '10 at 4:03














            2












            2








            2







            Add an entry to /etc/fstab. Here is an entry that I added just a few hours ago for my Seagate USB drive:



            UUID=4ACC734ECC733375 /media/Linux ext3 errors=remount-ro,defaults,users,noatime,nodiratime 0 0



            The key here is the "users" entry that allows users to mount and unmount the drive.



            Edit: this works for specific drives - I don't know if it can be enabled for all drives with one entry.






            share|improve this answer















            Add an entry to /etc/fstab. Here is an entry that I added just a few hours ago for my Seagate USB drive:



            UUID=4ACC734ECC733375 /media/Linux ext3 errors=remount-ro,defaults,users,noatime,nodiratime 0 0



            The key here is the "users" entry that allows users to mount and unmount the drive.



            Edit: this works for specific drives - I don't know if it can be enabled for all drives with one entry.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 15 '10 at 3:08

























            answered Aug 15 '10 at 2:47









            TomTom

            1,27378




            1,27378













            • If a user mounts the drive, would all other users get rw permission as well?

              – Jonas
              Aug 15 '10 at 4:03



















            • If a user mounts the drive, would all other users get rw permission as well?

              – Jonas
              Aug 15 '10 at 4:03

















            If a user mounts the drive, would all other users get rw permission as well?

            – Jonas
            Aug 15 '10 at 4:03





            If a user mounts the drive, would all other users get rw permission as well?

            – Jonas
            Aug 15 '10 at 4:03











            1














            Type mount. This will give the current place it is at. Here is my output.



            rick@rick-Main ~ $ mount
            /dev/sda4 on / type ext4 (rw,errors=remount-ro)
            proc on /proc type proc (rw,noexec,nosuid,nodev)
            sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
            none on /sys/fs/cgroup type tmpfs (rw)
            none on /sys/fs/fuse/connections type fusectl (rw)
            none on /sys/kernel/debug type debugfs (rw)
            none on /sys/kernel/security type securityfs (rw)
            udev on /dev type devtmpfs (rw,mode=0755)
            devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
            tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
            none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
            none on /run/shm type tmpfs (rw,nosuid,nodev)
            none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
            none on /sys/fs/pstore type pstore (rw)
            /dev/sda6 on /media/DATA1 type vfat (rw,uid=1000,utf8,umask=077)
            binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
            systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
            gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=rick)
            /dev/sdf1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)


            The last is my usb drive automouunted by Linux Mint.



            Now type



            sudo umount /dev/sdf1


            this will unmount drive



            now remount correctly.



            sudo mount -t vfat /dev/sdf1 /media/usb0 -o rw,users,umask=0





            share|improve this answer






























              1














              Type mount. This will give the current place it is at. Here is my output.



              rick@rick-Main ~ $ mount
              /dev/sda4 on / type ext4 (rw,errors=remount-ro)
              proc on /proc type proc (rw,noexec,nosuid,nodev)
              sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
              none on /sys/fs/cgroup type tmpfs (rw)
              none on /sys/fs/fuse/connections type fusectl (rw)
              none on /sys/kernel/debug type debugfs (rw)
              none on /sys/kernel/security type securityfs (rw)
              udev on /dev type devtmpfs (rw,mode=0755)
              devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
              tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
              none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
              none on /run/shm type tmpfs (rw,nosuid,nodev)
              none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
              none on /sys/fs/pstore type pstore (rw)
              /dev/sda6 on /media/DATA1 type vfat (rw,uid=1000,utf8,umask=077)
              binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
              systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
              gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=rick)
              /dev/sdf1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)


              The last is my usb drive automouunted by Linux Mint.



              Now type



              sudo umount /dev/sdf1


              this will unmount drive



              now remount correctly.



              sudo mount -t vfat /dev/sdf1 /media/usb0 -o rw,users,umask=0





              share|improve this answer




























                1












                1








                1







                Type mount. This will give the current place it is at. Here is my output.



                rick@rick-Main ~ $ mount
                /dev/sda4 on / type ext4 (rw,errors=remount-ro)
                proc on /proc type proc (rw,noexec,nosuid,nodev)
                sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
                none on /sys/fs/cgroup type tmpfs (rw)
                none on /sys/fs/fuse/connections type fusectl (rw)
                none on /sys/kernel/debug type debugfs (rw)
                none on /sys/kernel/security type securityfs (rw)
                udev on /dev type devtmpfs (rw,mode=0755)
                devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
                tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
                none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
                none on /run/shm type tmpfs (rw,nosuid,nodev)
                none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
                none on /sys/fs/pstore type pstore (rw)
                /dev/sda6 on /media/DATA1 type vfat (rw,uid=1000,utf8,umask=077)
                binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
                systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
                gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=rick)
                /dev/sdf1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)


                The last is my usb drive automouunted by Linux Mint.



                Now type



                sudo umount /dev/sdf1


                this will unmount drive



                now remount correctly.



                sudo mount -t vfat /dev/sdf1 /media/usb0 -o rw,users,umask=0





                share|improve this answer















                Type mount. This will give the current place it is at. Here is my output.



                rick@rick-Main ~ $ mount
                /dev/sda4 on / type ext4 (rw,errors=remount-ro)
                proc on /proc type proc (rw,noexec,nosuid,nodev)
                sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
                none on /sys/fs/cgroup type tmpfs (rw)
                none on /sys/fs/fuse/connections type fusectl (rw)
                none on /sys/kernel/debug type debugfs (rw)
                none on /sys/kernel/security type securityfs (rw)
                udev on /dev type devtmpfs (rw,mode=0755)
                devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
                tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
                none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
                none on /run/shm type tmpfs (rw,nosuid,nodev)
                none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
                none on /sys/fs/pstore type pstore (rw)
                /dev/sda6 on /media/DATA1 type vfat (rw,uid=1000,utf8,umask=077)
                binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
                systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
                gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=rick)
                /dev/sdf1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)


                The last is my usb drive automouunted by Linux Mint.



                Now type



                sudo umount /dev/sdf1


                this will unmount drive



                now remount correctly.



                sudo mount -t vfat /dev/sdf1 /media/usb0 -o rw,users,umask=0






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 26 '14 at 18:23









                Jason Aller

                2,22652121




                2,22652121










                answered May 26 '14 at 17:05









                RickRick

                111




                111






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f175987%2fhow-can-i-automatically-set-write-permissions-on-mounting-a-usb-drive-in-linux%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

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix