Как смонтировать раздел cifs для чтения и записи?

Я почти уверен, что запись fstab здесь верна, но когда смонтирован общий ресурс cifs, он доступен только для чтения. Чего мне не хватает?

/ etc / fstab запись:

//192.168.1.200/music/ /home/erik/Music-Bespin cifs credentials=/home/erik/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

А вот соответствующая smb.conf̀ сторона сервера

[global]
    server string = samba_server
    server role = standalone server
    interfaces = lo eno1
    bind interfaces only = yes
    disable netbios = yes
    smb ports = 445
    log file = /var/log/samba/smb.log
    max log size = 10000
[music]
    path = /home/erik/Shared/Music
    valid users = erik
    read only = no
    writeable = yes
    browseable = yes
    public = yes
    force create mode = 0777
    force directory mode = 0777
    force user = nobody
    guest ok = yes
1
задан 25 June 2020 в 18:18

2 ответа

Вы пытались добавить опцию rw к вашей записи в fstab?

//192.168.1.200/music/ /home/erik/Music-Bespin cifs credentials=/home/erik/.smbcredentials,noperm,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
0
ответ дан 30 July 2020 в 22:25

A CIFS mount cannot override the permissions settings of Samba or the underlying Linux permissions.

Your "music" share definition allows only "erik" access to the share. Since the Music subfolder - on the server - is likely owned by "erik" everything should work.

Except you stipulated force user = nobody in your share definition. That "forces" "erik" to become "nobody" which likely has no write access to that folder.

Either remove the force user = nobody line from your [music] share or change it to force user = erik

Then restart smbd

1
ответ дан 30 July 2020 в 22:25

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

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