montagem / problema de permissão [duplicado]

0

Eu tenho dois discos rígidos externos que eu quero ler / escrever, então eu usei chmod 777 -R "the folder" mas nada aconteceu então eu olho um pouco e vi que o usuário para os discos rígidos é raiz e não o meu uso. Então eu usei chown -R "username_youwant" path_to_folder/folder_name e só consegui Operação não permitida então eu uso o comando su para que eu me torne root e faça o mesmo chown que antes, mas tenha a mesma operação não premeditada. a parte estranha que faz isso eu não understad é que eu tenho permissão de leitura / gravação em um dos discos rígidos, mas não aquele que eu quero adicionar arquivos som para. E agora eu não sei o que tentar em seguida. para resumir o que eu fiz:

  • chmod 777 -R "the folder"
  • chown -R "username_youwant" path_to_folder/folder_name
  • su + chown -R "username_youwant" path_to_folder/folder_name
por romaswe 05.12.2016 / 20:04

1 resposta

0

Veja como path_to_folder é montado via mount | grep path_to_folder .

Leia man 8 mount . Diz, em parte:

 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.

Veja também a opção remount .

    
por waltinator 05.12.2016 / 20:34