mount - 如何以可写权限在 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 服务器中挂载共享目录?
解决方案
你有没有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 restart
或systemctl restart smb
推荐阅读
- php - 如何将此 php 查询转换为 mysql?
- android - 在 android studio 3.0 中创建一个新项目耗时太长,并且创建时出错
- css - 如何从按钮中取出除顶部边框之外的所有边框?
- android - 创建导航抽屉以链接到片段和活动
- r - 在 R 中运行包含求和的非线性 (nls) 回归
- javascript - 将对象属性设置为嵌套属性、函数或数组时出现 JS 错误
- bash - Bash 程序在运行时无论如何都会退出
- php - Shopify 如何管理域?
- android - 我应该始终使用 MaterialApp 作为我的应用程序的父小部件吗?
- ansible - Ansible Playbook 卡在任务部分