我有一个在 Ubuntu 18.04 上运行的 Samba 共享,它已经运行了一段时间,没有出现问题。现在,当我在 Windows 10 计算机上访问该共享时,它工作正常,直到我删除或将文件复制到共享。删除或复制文件有效,但随后它将不再可用,直到我重新启动 Windows 10 计算机。读取工作正常,没有问题。我在多台 Windows 10 计算机上都遇到了这个问题。日志显示此错误:
[2019/05/30 06:30:15.187133, 0] ../source3/param/loadparm.c:3350(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/storage failed. Permission denied
任何帮助将不胜感激!
答案1
供客人使用。
授予读/写权限:
sudo chmod -R +rwx /var/lib/samba/usershares/storage
更改所有者:
sudo chown -R nobody:nogroup /var/lib/samba/usershares/storage
备份您的/etc/samba/smb.conf
文件,然后修改您的配置文件,如果不存在则添加以下行:
[global]
guest account = nobody
usershare allow guests = Yes
[storage]
path = /var/lib/samba/usershares/storage
comment = sambashare on Ubuntu
directory mask = 0755
create mode = 0777
read only = no
available = yes
browseable = yes
writable = yes
guest ok = yes
public = yes
locking = no
strict locking = no