第一步:在根下执行:mkdir /public
修改下权限:chmod 777 /public
第二步:vi /etc/samba/smb.conf
修改如下配置:
修改security = user为security = share
shift+g移动光标到文末:添加如下内容
[public]
        comment = public
        path = /public
        public = yes
        read only = no
最后:重启smb服务:service smb restart

 

=====================================================

samba 创建samba 用户

smbpassword -a apache 回车后输入密码!

查看apache进程的执行者

ps -ef | grep httpd

授权

setfacl -m u:apache:rwx -R htdocs/

setfacl -m d:u:apache:rwx  -R htdocs/

==========================================

 防火墙开放端口(或者是直接关闭 /etc/init.d/iptables stop) 
1)开放端口 
iptables -I INPUT -p udp --dport 137 -j ACCEPT 
iptables -I INPUT -p udp --dport 138 -j ACCEPT 
iptables -I INPUT -p tcp --dport 139 -j ACCEPT    
iptables -I INPUT -p tcp --dport 445 -j ACCEPT
 
2)保存配置 
/etc/init.d/iptables save 
3)重启防火墙 
/etc/init.d/iptables restart

相关文章:

  • 2021-07-27
  • 2021-12-25
  • 2021-09-24
  • 2021-09-11
  • 2021-11-19
  • 2021-04-09
猜你喜欢
  • 2022-02-10
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-07-11
相关资源
相似解决方案