linux挂载ntfs磁盘无法修改磁盘下子目录权限问题(chmod, chown目录文件均无效)
ntfs文件系统不支持*unix权限模式
临时挂载
mount /dev/sda1 -t ntfs-3g -o permissions /protable-disk/
永久挂载
-
查看所有磁盘设备
fdisk -l
输出
Disk /dev/loop5: 53.26 MiB, 55844864 bytes, 109072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk model: WDC PC SN530 SDBPMPZ-512G-1101 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 2500393B-D714-4C1B-BE6B-DA031FD75A4E Device Start End Sectors Size Type /dev/nvme0n1p1 2048 206847 204800 100M EFI System /dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved /dev/nvme0n1p3 239616 830932991 830693376 396.1G Microsoft basic data /dev/nvme0n1p4 830932992 998703103 167770112 80G Microsoft basic data /dev/nvme0n1p5 998705152 1000212479 1507328 736M Windows recovery environment Disk /dev/sda: 1.82 TiB, 2000398933504 bytes, 3907029167 sectors Disk model: Portable Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xdc86e7cf Device Boot Start End Sectors Size Id Type /dev/sda1 64 3907024128 3907024065 1.8T 7 HPFS/NTFS/exFAT
-
查看磁盘uuid
blkid /dev/sda1
输出
/dev/sda1: LABEL="Seagate Portable Drive" BLOCK_SIZE="512" UUID="BAD2190DD218D00D" TYPE="ntfs" PARTUUID="dc86e7cf-01"
-
修改/etc/fstab,在文件最下方添加新行
UUID=BAD2190DD218D00D /protable-disk ntfs-3g permissions 0 1
-
重启系统、配置生效