2

I mount a FAT32 filesystem (because it needs to be compatible with windows) that has an SVN repository on it. It is mounted with owners root:plugdev and permissions rwxrwx--- . My user account is a member of plugdev, so I can edit my files fine.

However, when I try to commit to the SVN repository I get the following message:

Transmitting file data .svn: E000001: Commit failed (details follow):
svn: E000001: Can't set permissions on '/media/data/SVN/Electronics/.svn/tmp/svn-dk1XN3': Operation not permitted

This is of course because my user isn't the owner of that file. I can commit with sudo svn ci. But I'm lazy, and typing sudo starts to annoy me.

I've tried many changes to the /etc/fstab file looking all over the internet and have come up with this:

UUID=EA08-6773 /media/data vfat umask=007,gid=1000,uid=1000,dmask=0000,fmask=0000,utf8,allow_other,user 0 0

I am user 1000. The line used to be:

UUID=EA08-6773 /media/data vfat defaults,umask=007,gid=46 0 0

So I changed the permissions mask for both files and directories, added uid and changed gid, and added allow_other and user. This last change did make that I can now mount the volume without sudo, but for the rest none of these changes have any effect. The permissions are not updated, and the owner is still root:plugdev.

The permissions of the mountpoint /media/data are rwxrwxr-x for camilstaps:root (but when I mount this changes to root:plugdev automatically).

How can I let fstab mount this FAT32 volume with me as owner, so that I can change permissions?


Response to request in the comments

camilstaps@lenovo:~$ groups camilstaps
camilstaps : camilstaps adm cdrom sudo dip plugdev fuse lpadmin sambashare

grep ``whoami`` /etc/passwd with single back-ticks returns:

camilstaps:x:1000:1000:Camil:/home/camilstaps:/bin/bash
10
  • Ownership and permissions of vfat / ntfs are set at the time of mounting as defaults and since Windows formats do not support ownership & permissions you cannot change them.
    – oldfred
    Feb 15, 2015 at 23:46
  • @oldfred can I change the defaults?
    – user125111
    Feb 16, 2015 at 7:25
  • i am no expert on settings for Windows formats. I used user,auto,fmask=0113,dmask=0002 for my FAT32 partition, but have not used FAT32 since 2010 after I found it was truncating all my files over 4GB and had no journal. Use NTFS if you have larger files.
    – oldfred
    Feb 16, 2015 at 15:28
  • 1
    Have a read at the link above. FAT32 plainly and sipmly doesn't support permissions. Permissions on FAT32 are only simulated.
    – Fabby
    Feb 18, 2015 at 7:21
  • 1
    @Fabby thanks very much, that helps. If there were a way to mount the filesystem as myself though, that would be fine as well. Or a way to alter the simulation behaviour. Is there?
    – user125111
    Feb 18, 2015 at 7:47

1 Answer 1

0
  1. The owner of the svn repository needs to be changed by:

    sudo chown --recursive camilstaps:plugdev /Path/To/Dir/*
    
  2. The FAT partition needs to be mounted using:

    UUID=EA08-6773 /media/data vfat gid=1000,uid=1000,dmask=027,fmask=137,nosuid,nodev,users 0 2
    
1
  • test it first before you accept! :P ;-)
    – Fabby
    Feb 18, 2015 at 9:18