5

I realised that Ubuntu automatically mounts my internal drives which are some exFats automatically when I try to open them. Thats good.

However, it is mounted as "root" and I want to mount it as my current user. Is there any way to make it mount not as root through some configurations or do I have to do it as a command?

Thanks

1

Software to run exFAT

Depending on the version of Ubuntu or Ubuntu based operating system you may or may not need to install the following program packages,

sudo apt-get install exfat-utils exfat-fuse

See this link for more details,

How do I copy a file larger than 4GB to a USB flash drive?

Mounting exFAT

Many versions of Ubuntu and Ubuntu based operating systems will mount Microsoft file systems (FAT32, exFAT, NTFS) with read/write permissions automatically for root as well as the current user.

But some versions (of Ubuntu and Ubuntu based operating systems) will mount them with write permissions only for root (or not at all). Then you can unmount and remount (mount) the file system with commands like this,

Create mountpoint (only if you want a new mountpoint)

sudo mkdir -p /mnt/sd1

Unmount (only if already mounted)

sudo umount /dev/sdxn   # general syntax
sudo umount /dev/sdb1   # modify to match your case

Check your userID's uid number (it is usually 1000, sometimes 1001 or 1002 ...)

grep ^"$USER" /etc/group

and use that number if you want to grab ownership (default is root).

Example of mount command line that should give you something that is close to what you want,

sudo mount -o rw,users,uid=1000,dmask=007,fmask=117 /dev/sdxn /mnt/sd1  # general syntax
sudo mount -o rw,users,uid=1000,dmask=007,fmask=117 /dev/sdb1 /mnt/sd1  # modify to match your case

See this link for more details,

How to change default permissions on automounted usb flash, formatted in NTFS?

0

It seems like the default automount behaviour which is provided by gnome features does not have so much possibility for configuration.

What you want to do, is you add mount option umask=0, which can be done if configured in /etc/fstab like this:

/dev/sda1 /media/usbdrive exfat rw,async,umask=0 0 0

This kind of goes against the automount concept though, since it means static configuration.

It could probably be achivied by using automount and autofs though:

https://help.ubuntu.com/community/Autofs

If you chose this path, then you should disable the automount option in gnome:

https://help.ubuntu.com/community/Mount/USB#Configuring_Automounting

  • I don't have a /etc/fstab file (Ubuntu 14.10). – Martin Thoma Jan 4 '15 at 11:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.