首页 > 解决方案 > 如何以可写权限在 samba 服务器中挂载共享目录?

问题描述

创建目录:

mkdir  /tmp/shared

在 samba 服务器中挂载目录:

sudo mount -t cifs -o user=smb  //192.168.31.21/shared    /tmp/shared
Password for smb@//192.168.31.21/shared:  ***

它已挂载,并且可以列出其中的所有文件:

ls  /tmp/shared

文件编辑后无法保存 - 错误:

Failed to save the document
permission denied

如何以可写权限在 samba 服务器中挂载共享目录?

标签: mountpermission-deniedsamba

解决方案


你有没有writeable = yes在你的 /etc/samba/smb.conf

允许所有用户访问和写入:

 [share]
 path = /shared
 browseable = yes
 read only = no  
 writeable = yes
 browseable = yes
 public = yes
 create mask = 0644
 directory mask = 0755

取决于您的发行版/etc/init.d/samba restartsystemctl restart smb


推荐阅读