【问题标题】:How to mount the shared directory in samba server with writable permission? [closed]如何以可写权限在 samba 服务器中挂载共享目录? [关闭]
【发布时间】:2021-05-10 07:48:49
【问题描述】:

创建目录:

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服务器中挂载共享目录并具有可写权限?

【问题讨论】:

  • 您需要登录名+密码访问吗?如果没有,您可以尝试使用匿名用户访问的 samba 配置:gist.github.com/EvilLord666/a9943d873f8a700a0175024f3968acc2
  • 据我了解,这里显示的所有命令行都是在客户端执行的。服务器(192.168.31.21)上的samba配置是什么?

标签: mount permission-denied samba


【解决方案1】:

您是否在您的 /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

【讨论】:

    猜你喜欢
    • 2014-08-17
    • 1970-01-01
    • 2013-11-13
    • 2013-06-05
    • 2012-11-17
    • 1970-01-01
    • 2014-04-04
    • 1970-01-01
    • 2020-01-02
    相关资源
    最近更新 更多