2

I went through every question & answer about mounting external exfat drive on "Ask Ubuntu", but none of them is of any help to my situation. Hope that someone can help me out.

I am running Ubuntu 22.04 and after successfully mounting an external USB exfat 4TB SSD, I found that the drive only allows "super user" to write and create files on it. Users' permissions are restricted to read only. I tried using commands: chown, chmod and none of them worked. More, nothing about the drive showed up in /etc/fstab after the mount.

Here are what I saw on my terminal:

cl@icl-HP-ENVY-Notebook:~$ ls -lar /media/
total 20
drwxrwxrwx+  4 root root 4096 Oct  9 13:48 icl
drwxrwxrwx   2 icl  icl  4096 Oct  4 20:55 exfat-1
drwxrwxrwx   2 icl  icl  4096 Aug 20  2022 exfat
drwxr-xr-x  20 root root 4096 Oct  3 19:17 ..
drwxrwxrwx   5 root root 4096 Oct  4 20:55 .
icl@icl-HP-ENVY-Notebook:~$ sudo mount -t exfat /dev/sdd /media/exfat
[sudo] password for icl: 
icl@icl-HP-ENVY-Notebook:~$ ls -lar /media/
total 1040
drwxrwxrwx+  4 root root    4096 Oct  9 13:48 icl
drwxrwxrwx   2 icl  icl     4096 Oct  4 20:55 exfat-1
drwxr-xr-x   4 root root 1048576 Oct  9 21:22 exfat
drwxr-xr-x  20 root root    4096 Oct  3 19:17 ..
drwxrwxrwx   5 root root    4096 Oct  4 20:55 .

Please Note: ownership and group of /media/exfat changed to "root" after the mount, whereas previously ownership and group of /media/exfat were "icl" (why?)


icl@icl-HP-ENVY-Notebook:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=33818781-1f10-4a52-af6a-65b75c14863b /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=B812-0612  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
icl@icl-HP-ENVY-Notebook:~$ 

Please Note: nothing about the mounted drive showed up in /etc/fstab


While I could logon as super user: "su" and create and copy files on the newly mounted drive, I could not do it as a user.

I tried using command line: chmod, chown while logging in as su, none of them worked.

I also tried using the Disk Utility, still it didn't work.

Also, could someone tell me how to auto mount the said external USB 4TB exfat SSD drive, such that every user can have write privilege.

mchid
  • 43,546
  • 8
  • 97
  • 150
kowloon
  • 21
  • I believe you will have to manually edit /etc/fstab to add an entry if you want it to automatically mount when you boot. However, did you explore using umask options when manually mounting the drive? (scroll down to Example with full permissions for everybody and to obtain your proper gid and uid number for your current user, use the id $USER command). If you are familiar with the chmod permission numbers, a umount value of 000 is equal to a chmod permission of 777. – mchid Oct 10 '23 at 06:09
  • So this should probably do it: sudo mount -o rw,users,umask=000 /dev/sdd /media/exfat and I guess if you give everyone full permission with 000, the gid and uid isn't important but useful for the other command used in the answer. – mchid Oct 10 '23 at 06:26
  • 1
    Of course umask of 000 gives everyone total access and execute permissions on drive. So when you download (accidentally) some virus, it also gets execute permissions. Windows formats do not support Linux ownership & permissions and only should be used if dual booting with Windows so you can run necessary maintenance that cannot be done from Linux. Also exFAT not best for very large drive. – oldfred Oct 10 '23 at 14:07

0 Answers0