diretório altera a permissão quando montado

10

Eu quero montar um samba sghare em um diretório no meu diretório pessoal. Eu criei mas monte o compartilhamento como root. Após a montagem, o proprietário do meu dir muda para root e meu usuário não tem permissão para copiar arquivos de rito no compartilhamento ... Como faço para modificar minha linha de montagem para poder montar com permissões de gravação? Atualmente, é assim: sudo mount -t cifs //IP/share/ /mount/point/ -o rw,username=user,password=pass,domain=domain

    
por cerr 23.04.2014 / 19:10

1 resposta

7

Use as opções de montagem uid e gid :

uid=arg

sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher to support specifying the uid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

forceuid

instructs the client to ignore any uid provided by the server for files and directories and to always assign the owner to be the value of the uid= option. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

gid=arg

sets the gid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a groupname or a numeric gid. When not specified, the default is gid 0. The mount.cifs helper must be at version 1.10 or higher to support specifying the gid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

    
por 23.04.2014 / 19:13