# More Linux questions

**URL:** <https://boards.straightdope.com/t/more-linux-questions/512466>\
**Category:** Factual Questions\
**Created:** [October 3, 2009, 5:48pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466 "2009-10-03T17:48:24Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [October 4, 2009, 4:07am UTC](https://boards.straightdope.com/t/more-linux-questions/512466/21 "2009-10-04T04:07:06Z")

</div>

Create a new group and add both you and your wife to it(a user can be a member of multiple groups), and use that group for the permissions on the mount.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [October 4, 2009, 1:11pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/22 "2009-10-04T13:11:46Z")

</div>

I’ve added ,gid=100 and made sure my wife and are both in that group, but no go. The permissions on the drive as mounted are  
drwxr-xr-x 18 root root 32768 1969-12-31 19:00 disk-4

so there’s no write access for group or world. There must be somewhere this is set to those permissions.

---

<div class="post-metadata">

**Author:** ![snailboy](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@snailboy](https://boards.straightdope.com/u/snailboy)\
**Post date:** [October 4, 2009, 1:49pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/23 "2009-10-04T13:49:46Z")

</div>

I was mistaken about the umask option. It normally changes the permissions of newly-created files, but when mounting a FAT filesystem, it apparently sets permissions on existing files and directories too per [here](http://www.sdconsult.no/linux/wine-doc/vfat.html). My only thought is that you set the umask to a four-digit number, and all the examples I’ve seen are three-digit numbers. Try setting the gid to the users gid and set umask to 002. You don’t really want to enable write permission for everyone, including users that shouldn’t be logged in.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [October 4, 2009, 2:12pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/24 "2009-10-04T14:12:49Z")

</div>

I have seen both three digit and four digit umask numbers, so that’s why I had four, but I had previously tried it with three digits as well.

Tried this just now (I’ve been incrementing disk-# in case it was just not updating the previous mount), but directory permissions are unchanged  
/dev/sda5 /media/disk-8 vfat quiet,defaults,rw,umask=002,gid=100 0 0  
Tried it with umask=000 also, with the same result.

---

<div class="post-metadata">

**Author:** ![Fubaya](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Fubaya](https://boards.straightdope.com/u/Fubaya)\
**Post date:** [October 4, 2009, 4:15pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/25 "2009-10-04T16:15:29Z")

</div>

Hmm, apparently it is sometimes better to use dmask/fmask than umask. Try with dmask=027,fmask=137 or dmask=000,fmask=111

auto,users,uid=1000,gid=100,dmask=027,fmask=137 0 0

Those are from official Ubutnu documentation.

Sheesh, is this a Ubutnu thing? Whenever I update my system, I backup a lot of files to a certain partition. After 10 years using several flavors of Linux, but mostly Slackware, I have several fstab files. I grepped them for vfat and the only think in them are these two lines.

noauto,user 0 0  
auto,users,rw 1 2

The first one is what I’ve written myself, the second are set up during installation (which explains the 1 2) but they have always worked.

---

<div class="post-metadata">

**Author:** ![Fubaya](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Fubaya](https://boards.straightdope.com/u/Fubaya)\
**Post date:** [October 4, 2009, 4:19pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/26 "2009-10-04T16:19:53Z")

</div>

Also, make sure you remount it after changing the fstab

umount /dev/sda5  
mount /dev/sda5

And “drwxr-xr-x 18 root root 32768 1969-12-31 19:00 disk-4” means the directory /media/disk-4 has drwxr-xr-x permissions. That doesn’t affect the contents of the vfat stuff inside, the directory itself is under linux. If you’re checking permissions, do it on a file inside the vfat partition.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [October 4, 2009, 4:56pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/27 "2009-10-04T16:56:54Z")

</div>

> [@Fubaya](#):
>
> Also, make sure you remount it after changing the fstab
> 
> umount /dev/sda5  
> mount /dev/sda5
> 
> And “drwxr-xr-x 18 root root 32768 1969-12-31 19:00 disk-4” means the directory /media/disk-4 has drwxr-xr-x permissions. That doesn’t affect the contents of the vfat stuff inside, the directory itself is under linux. If you’re checking permissions, do it on a file inside the vfat partition.

I’ve been making additional directories, and mounting into them, in case that was causing problems (I’m up to disk-10). Also, I’ve been trying  
cat \> dum  
or  
mkdir dumd  
from within the disk-4, etc. directories after running “sudo mount -a”. All the subdirectories also have permissions set to drwxr-xr-x. The dmask,fmask suggestions didn’t help any.

I’ve got a question up over a [LinuxForums](http://www.linuxforums.org/forum/installation/153819-setting-permissions-automatically-mounted-fat-partition.html#post732284) as well.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [October 4, 2009, 6:36pm UTC](https://boards.straightdope.com/t/more-linux-questions/512466/28 "2009-10-04T18:36:47Z")

</div>

Success!

I completely rebooted with  
/dev/sda5 /media/disk2 vfat auto,users,uid=1000,gid=100,dmask=000,fmask=111 0  
in fstab, and the permssions are set to allow writing.

Logged in as my wife, and she can write also. Also, in Thunderbird my old emails all show up now.

[Previous page](https://boards.straightdope.com/t/more-linux-questions/512466.md?page=1)
