Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Debian 掛載移動硬碟 NTFS 分區讀寫報錯解決方案

編輯:關於 Linux

Debian 桌面自動掛載移動硬碟時,部份 NTFS 分區彈出 Unprivileged user can not mount NTFS block devices using the external FUSE library 錯誤,核心原因是 ntfs-3g 缺乏 setuid root 權限或 FUSE 整合編譯缺失。

現場診斷

# 查看目前掛載狀態
cat /etc/mtab
# 發現僅掛載 sdb3 (FAT32) 與 sdb5 (NTFS),sdb1/sdb2 (NTFS) 未掛載

# 查看分區表
fdisk -l
# 確認 sdb1/sdb2 為 NTFS (ID=7)

解決方案:重新編譯安裝具 setuid 的 ntfs-3g

# 1. 移除套件版本
apt-get remove ntfs-3g

# 2. 安裝編譯依賴
apt-get install build-essential libfuse-dev pkg-config

# 3. 下載原始碼並啟用整合 FUSE + setuid
wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
tar xzf ntfs-3g_ntfsprogs-2017.3.23.tgz
cd ntfs-3g_ntfsprogs-2017.3.23
./configure --enable-posix-acls --enable-xattr-mappings --with-fuse=internal
make
make install

# 4. 設定 setuid root
chmod u+s /usr/bin/ntfs-3g

# 5. 重新插拔硬碟或手動掛載
mount -t ntfs-3g /dev/sdb1 /mnt/usb1

NTFS 掛載錯誤

替代方案: 若不想重編譯,可在 /etc/fstab 以 uid=1000,gid=1000,umask=022 參數由 root 手動掛載,但失去桌面自動掛載便利性。
Copyright © Windows教程網 All Rights Reserved