![为什么我没有访问新硬盘上文件夹的权限?](https://linux22.com/image/951529/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E6%B2%A1%E6%9C%89%E8%AE%BF%E9%97%AE%E6%96%B0%E7%A1%AC%E7%9B%98%E4%B8%8A%E6%96%87%E4%BB%B6%E5%A4%B9%E7%9A%84%E6%9D%83%E9%99%90%EF%BC%9F.png)
我添加了一个新硬盘作为存储设备,但想要将某些内容保存到挂载该硬盘的文件夹 (/hdd) 中却无法实现。例如,尝试保存一个 html 文件
Failed to save 'html': Unable to write file '/hdd/html' (Unknown (FileSystemError): Error: Unknown system error -74: Unknown system error -74, open '/hdd/html')
尝试使用修改权限的代码
chown -R user /hdd
结果如下:
chown: cannot read directory '/hdd': Bad message
sudo fdisk -l
Disk /dev/sda: 298,09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200AAJS-6
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: A4E0084C-7105-4787-B6D2-A1D70A1B6CDD
Device Start End Sectors Size Type
/dev/sda1 2048 625141759 625139712 298,1G Linux filesystem
在 /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/sdb2 during installation
UUID=04e3700b-e01f-4bd2-b273-6ee85780cf2e / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sdb1 during installation
UUID=3782-4CC0 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=b0ea8d6d-49c9-4a0e-b496-5df4b2a16e52 /hdd ext4 defaults 0 0