分区权限 - chgrp 无法访问

分区权限 - chgrp 无法访问

我的硬盘上有一个分区,标签为“大驱动器”(参见下面的 sda5)

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: 0x0005a7c8

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048  117114879  117112832  55.9G 83 Linux
/dev/sda2        117116926 1953523711 1836406786 875.7G  5 Extended
/dev/sda5        117116928 1943300095 1826183168 870.8G 83 Linux
/dev/sda6       1943302144 1953523711   10221568   4.9G 82 Linux swap /Solaris
Partition 2 does not start on physical sector boundary.

Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0x000735db

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1            2048 960122879 960120832 457.8G 83 Linux
/dev/sdb3       960124926 976771071  16646146     8G  5 Extended
/dev/sdb5       960124928 976771071  16646144     8G 82 Linux swap /Solaris

nevil@Desktop:~$ sudo blkid
/dev/sda1: UUID="00d44d08-7c27-42d5-bb2b-0e54507b5e93" TYPE="ext3" PARTUUID="0005a7c8-01"
/dev/sda5: LABEL="Big Drive" UUID="f455fc36-19b4-4c1d-9923-9f2b5bb7d406" TYPE="ext4" PARTUUID="0005a7c8-05"
/dev/sda6: UUID="93e8651c-da16-43c1-ab3e-3e6d910d1085" TYPE="swap" PARTUUID="0005a7c8-06"
/dev/sdb1: UUID="04f7f55d-0867-4de1-8312-a20a4c5db165" TYPE="ext4" PARTUUID="000735db-01"
/dev/sdb5: UUID="bec981a2-858e-4821-8c90-b22d1ac1cfd8" TYPE="swap" PARTUUID="000735db-05"

它归 Root 所有。我是管理员(Ubuntu 16.04),还有其他四个用户。该分区包含文档文件。我希望每个人都能读取/写入这些文件夹。但是,我不愿意使用“chown 777”命令(因为每个人都说它很危险!),因此尝试按照说明将所有权添加到组中。但是这没有成功。每次我尝试使用“chgrp”命令时,它都无法看到分区或告诉我它不存在:

nevil@Desktop:~$ ll /media/nevil
total 16
drwxr-x---+  4 root root 4096 Jan  5 15:49 ./
drwxr-xr-x   3 root root 4096 Jan  4 21:20 ../
drwxr-xr-x  25 root root 4096 Jan  4 20:51 00d44d08-7c27-42d5-bb2b-0e54507b5e93/
drwxr-xr-x   9 root root 4096 Apr 12  2016 Big Drive/

nevil@Desktop:~$ sudo chgrp adm /media/nevil/Big Drive
chgrp: cannot access '/media/nevil/Big': No such file or directory
chgrp: cannot access 'Drive': No such file or directory

(我也尝试使用 UUID,结果相同)。有人能帮忙吗?我尝试过挂载和卸载分区。

谢谢 Nevil

答案1

空格是分隔符(分隔参数)。您必须将驱动器名称括在引号中。尝试:

sudo chgrp adm /media/nevil/'Big Drive'

相关内容