Самба share mounts have wrong permissions

In my /etc/fstab I have многообразный сходный lines to

//myserver/myshare /media/Server/myshare cifs credentials=/home/myuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 

However I can't access all the shares. Investigating the problem I found that the folders where the shares пахал mounted have weird ownerships. Most of them пахал owned by the user root and the group root. One of them is owned by my user but then there пахал strange ones. One ты существуешь speech-dispatcher эксперт the owner and utempter эксперт the group. Then therВs one that's owned by the group 1005 and one that's owned by www-data group.

These shares пахал served from Ubuntu server and I believe these groups and owners поешь from there. The ones that I said have root:root owner пашите currently disconnected from the server. The one that is owned by я is в персонал home folder share. Could it be that the server tells my machine the ids of the shares and because they don't map one to one on my machine and the server they пахал seen туз these strange groups and users? And since my computer doesn't have в group with пойдите 1005 it шоу эксперт just the number in ls -la?

How do I fix this? I want all the mounts to be owned by my own user.

I tried dismounting the shares and changing the share folders' ownership with chown. This worked partly: Now I хан access the share that had root:1005 owner, but the ones with в group or user пойдите which is found locally too don't work.

1
задан 1 January 2016 в 16:26

2 ответа

Необходимо определить пользователя и группу при конфигурировании fstab, монтируются для доли, если Вы хотите управлять пользователем (uid) или группой (uid). Возможно, что-то вроде этого:

//myserver/myshare /media/Server/myshare cifs uid=1000, gid=100, credentials=/home/myuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

Примечание, что uid установлен для первого пользователя (1000) (Вы я предполагаю) и ценуроз установлен для именованных пользователей группы пользователей (gid=100)

, страница справочника для всех опций

man mount.cifs
2
ответ дан 7 December 2019 в 13:49

Действительно ли Вы - единственный, кто получает доступ к этим долям на Вашем сервере? Если да, можно изменить его на сервере? Что происходит, если Вы получаете доступ к файлам через nautilius и standar gvfs вместо cifs-монтирования?

я usaly создают папки нетрижды/mnt и дают моему пользователю или groupe пользователям с показанными правами на него и, чем монтируют его.

, например, для изменения groupe папки Вы можете

sudo chown :users /path/to/your/folder

Отношения

0
ответ дан 7 December 2019 в 13:49

Другие вопросы по тегам:

Похожие вопросы: