排查步骤:
1、检查smb.conf
[global]
workgroup = WORKGROUP
security = user
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
unix charset = UTF-8
#display charset = UTF-8
guest account = nobody
dos charset = cp936
create mask = 777
directory mask = 777
[kdum]
comment = All Printers
path = /kingdom/szkdum
browseable = yes
guest ok = yes
writable = yes
read only = no
public = yes
directory mode = 0777
create mode = 0770
检查 writable = yes 是否设置,有没有拼写错误
2、检查上传目录权限是否可写

没有直接赋值最大的权限:
chmod 777 目录名
3、检查selinux是否关闭
getenforce
我这是设置临时关闭的状态:

临时关闭:
setenforce 0
永久关闭:
#将SELINUX=enforcing改为SELINUX=disabled
#设置后需要重启才能生效
vi /etc/selinux/config
参考:
https://blog.youkuaiyun.com/xinluke/article/details/51925293
https://bbs.youkuaiyun.com/topics/340018136
本文提供了Samba共享问题排查的详细步骤,包括检查smb.conf配置文件、验证上传目录权限和确认SELinux状态。适用于遇到Samba共享无法正常工作的情况。
1766





