如何自动挂载可移动 USB 驱动器?

如何自动挂载可移动 USB 驱动器?

当我将闪存驱动器插入 PC(Ubuntu 20.04.2 LTS)时,它不会自动挂载。我必须打开磁盘工具并手动安装驱动器。自动挂载设置已启用:

$ gsettings list-recursively org.gnome.desktop.media-handling 
org.gnome.desktop.media-handling autorun-never false
org.gnome.desktop.media-handling autorun-x-content-open-folder @as []
org.gnome.desktop.media-handling automount-open true
org.gnome.desktop.media-handling autorun-x-content-ignore @as []
org.gnome.desktop.media-handling automount true
org.gnome.desktop.media-handling autorun-x-content-start-app ['x-content/unix-software']

创建 fstab 条目对我来说不是一个好的解决方案,因为我还想自动挂载新设备。

肯定是某个地方的某个东西被禁用了,但我不知道在哪里。如果有人知道,请告诉我 :-)

journalctl -xe更新:根据评论中的要求,这是连接 USB 设备后的日志。

Aug 26 16:46:18 PC kernel: usb 1-6: new high-speed USB device number 3 using ehci-pci
Aug 26 16:46:18 PC kernel: usb 1-6: New USB device found, idVendor=0bc2, idProduct=2323, bcdDevice= 0.00
Aug 26 16:46:18 PC kernel: usb 1-6: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Aug 26 16:46:18 PC kernel: usb 1-6: Product: Expansion+
Aug 26 16:46:18 PC kernel: usb 1-6: Manufacturer: Seagate
Aug 26 16:46:18 PC kernel: usb 1-6: SerialNumber: NA8L5XB9
Aug 26 16:46:18 PC kernel: scsi host4: uas
Aug 26 16:46:18 PC kernel: scsi 4:0:0:0: Direct-Access     Seagate  Expansion+       9300 PQ: 0 ANSI: 6
Aug 26 16:46:18 PC kernel: sd 4:0:0:0: Attached scsi generic sg3 type 0
Aug 26 16:46:18 PC kernel: sd 4:0:0:0: [sdc] Spinning up disk...
Aug 26 16:46:18 PC mtp-probe[17138]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-6"
Aug 26 16:46:18 PC mtp-probe[17138]: bus: 1, device: 3 was not an MTP device
Aug 26 16:46:18 PC mtp-probe[17157]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-6"
Aug 26 16:46:18 PC mtp-probe[17157]: bus: 1, device: 3 was not an MTP device
Aug 26 16:46:22 PC kernel: ....ready
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] 3907029167 512-byte logical blocks: (2.00 TB/1.82 TiB)
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] Write Protect is off
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] Mode Sense: 4f 00 00 00
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] Optimal transfer size 33553920 bytes
Aug 26 16:46:22 PC kernel:  sdc: sdc1
Aug 26 16:46:22 PC kernel: sd 4:0:0:0: [sdc] Attached SCSI disk

此外,权限似乎是正确的:

getfacl /media/<username>

# file: media/<username>
# owner: root
# group: root
user::rwx
user:<username>:r-x
group::---
mask::r-x
other::---

相关内容