На этот вопрос уже есть ответ здесь:
У меня есть два внешних жестких диска, которые я хочу читать / писать, поэтому я использовал chmod 777 -R "the folder"
, но ничего не произошло, поэтому я посмотрел abit и увидел, что пользователь жестких дисков root, а не я.
Затем я использовал chown -R "username_youwant" path_to_folder / folder_name
и получил только Operation not allowed
, затем я использую команду su
, чтобы я стал пользователем root и сделайте то же самое, что и перед, но получите ту же операцию, не разрешенную.
странная часть, из-за которой я не понимаю, заключается в том, что у меня есть разрешение на чтение / запись на одном из жестких дисков, но не на том, который я хочу добавить файлы сомов в.
И теперь я не знаю, что попробовать дальше.
чтобы подвести итог тому, что я сделал:
chmod 777 -R "папка"
chown -R "username_youwant" путь_к_папке / имя_папки
su
+ chown -R "username_youwant" путь_к_папке / имя_папки
Посмотрите, как path_to_folder
смонтирован через mount | grep path_to_folder
.
Read man 8 mount
. Это говорит, частично:
The non-superuser mounts.
Normally, only the superuser can mount filesystems. However,
when fstab contains the user option on a line, anybody can mount
the corresponding filesystem.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 filesystem found on an inserted
CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that mounted a
filesystem can unmount it again. If any user should be able to
unmount it, then use users instead of user in the fstab line.
The owner option is similar to the user option, with the
restriction that the user must be the owner of the special file.
This may be useful e.g. for /dev/fd if a login script makes the
console user owner of this device. The group option is similar,
with the restriction that the user must be member of the group
of the special file.
Также смотрят remount
опция.