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

How to mount the shared directory in samba server with writable permission?

创建目录:

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服务器的共享目录挂载为可写权限?

您是否在 /etc/samba/smb.conf

中设置了 writeable = yes

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

 [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