Ownership/permission problem with automounting exfat drive

23,008

Automount exfat with user permissions

When specifying the auto option, the devices gets automatically mounted at boot time with root-permissions. The Proper options for exfat are described in the mount.exfat manpage. Change the /etc/fstab entry to:

/dev/sdb1 /media/maria/Lexfat exfat defaults,uid=1000,gid=1000 0 0

The defaults options (rw, suid, dev, exec, auto, nouser, and async) are good enough in most cases. The proper uid and gid can be obtained by

$ id yourusername
uid=1000(yourusername) gid=1000(yourusername) groups=1000(yourusername),4(adm),24(cdrom),...

chown in exfat

Regarding the chown problems and errors: exfat does not support user permissions. So using chown on a file inside exfat will always fail:

$ sudo chown root:root /media/maria/Lexfat/test.txt
chown: changing ownership of ‘test.txt’: Function not implemented

rsync into exfat

The problem with time-stamps and permissions are the same as the ownership issue: exfat does not support it. But rsync will still work, just don't use the -a option.

$ rsync -r /from/here /media/maria/Lexfat
Share:
23,008

Related videos on Youtube

swedishchef
Author by

swedishchef

Updated on September 18, 2022

Comments

  • swedishchef
    swedishchef almost 2 years

    I'm new to Linux and am having problems automounting an exFat-formatted partition on a Lacie-disk in Ubuntu 16.04.

    I installed exfat-fuse and exfat-utils and could then mount manually using:

    sudo mount -t exfat /dev/sdb2 /media/maria/Lexfat
    

    The exfat disk would not automount, however, so I edited /etc/fstab (not sure what the options mean, though, so perhaps the problem is there...?):

    sudo nano /etc/fstab
    /dev/sdb2 /media/maria/Lexfat exfat defaults,auto,umask=000,users,rw 0 0
    

    (I tried to get an UUID using blkid, but this does not list my exfat disk)

    Now, the disk is automounted when I startup Ubuntu, but owned by root user.

    So I need to give password to unmount it and am not allowed to remount with GUI. I am not allowed to change ownership using chown, either.

    I have transferred files from a remote server to the disk using rsync, which works fine except that I get

    failed to set times-error
    

    I'm guessing that both the mounting and rsync issues are ownership/permission problems, but I don't understand how to fix it. Any ideas, please?