[已解决]可移动存储设备没有写入权限的奇怪问题

某台机器从 Debian 8 开始一路跟随 testing 升级到 Debian 9,几年以来,一直受到奇怪问题困扰:插入优盘,在文件管理器中点击挂载后,普通用户没有权限写入。最近才发现罪魁祸首是 fstab 中的这两行:

/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sdb2       /media/usb1     auto    rw,user,noauto  0       0

我敢发誓,这两行不是我加的。不知道怎么冒出来的。

1 个赞

原来是这个 bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698727
是 Debian 8 安装程序的问题。

我把u盘格式化为fat16后问题就消失了。但对于移动硬盘,因为有很多文件不能格式化,还是老样子。查看了fstab,如下:http://paste.debian.net/993093/

# /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=5c6fdd56-2fbd-461c-a837-05c2a8ffc4a2 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda3 during installation
UUID=9a322c64-d7e7-4a20-9b79-1ffa01ef2388 /home           ext3    defaults        0       2
# /usr was on /dev/sda2 during installation
UUID=878d37a2-80cc-4708-ac45-d1f0b58b0621 /usr            ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=f9b85c65-b421-4858-aafb-ae6b31b7b840 none            swap    sw              0       0

我是重新安装的Debian 9,不知道那个根目录的errors=remount-ro是啥意思。