免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5261 | 回复: 7
打印 上一主题 下一主题

[FreeBSD] freebsd8.2+samba3.5.6共享文件无法访问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-31 17:54 |只看该作者 |倒序浏览
freebsd8.2+nfs+samba3.5.6安装好后启动服务都正常,在工作组中可以看到samba服务器,连接后可以看到共享的文件夹,可是打不开文件夹,提示没有访问权限,本人新手第一次安装samba,不知道怎么设置,另外服务器总是提示这样的错误:
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0] lib/util_sock.c:474(read_fd_with_timeout)
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0]lib/util_sock.c:1432(get_peer_addr_internal)
Dec 31 17:32:56 dserver smbd[1186]:getpeername failed. Error was Transport endpoint is not connected
Dec 31 17:32:56 dserver smbd[1186]:read_fd_with_timeout: client 0.0.0.0 read error = Socket is not connected
smb.conf如下:
[global]
        workgroup = WORKGROUP
        smb ports=139 445
        interfaces = 196.0.0.142
        printing = bsd        
        printcap name = /dev/null
        load printers = no
        disable spoolss = yes
        netbios name = dserver
        server string = Samba Server
        secutity = share
        hosts allow = 196.0.0  127.
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        interfaces = 196.0.0.142
        dns proxy = no

[diandiao]
comment = diandiao file space
path = /homes/diandiao
browseable = yes
writable = yes
public = yes
create mask = 0755
directory mask = 0755
不知道还需要什么设置,请大大们帮帮忙,谢谢啦)

论坛徽章:
2
技术图书徽章
日期:2013-11-23 01:55:57白羊座
日期:2013-12-08 15:48:16
2 [报告]
发表于 2011-12-31 18:16 |只看该作者
回复 1# lxc369


(1)chmod -R 777 /homes/diandiao                     <---- /home 还是 /homes ??

(2)
[global]
        workgroup = WORKGROUP
        smb ports=139 445
        interfaces = 196.0.0.142
        printing = bsd        
        printcap name = /dev/null
        load printers = no
        disable spoolss = yes
        netbios name = dserver
        server string = Samba Server
        secutity = share
        hosts allow = 196.0.0  127.
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        interfaces = 196.0.0.142
        dns proxy = no

[diandiao]
comment = diandiao file space
path = /homes/diandiao                       <---- /home 还是 /homes ??
browseable = yes
guest ok = yes
guest only = yes
writable = yes
write list = +staff
public = yes
create mask = 0022                            <---- 详情参见mask,0022不行的话,就改为022.
directory mask = 0022                        <---- 同上

(3)重启samba

论坛徽章:
0
3 [报告]
发表于 2011-12-31 18:31 |只看该作者
用楼上的方法测试一下看看,如果是权限问题,应该用过777之后就可以了。然后再微调吧。

论坛徽章:
0
4 [报告]
发表于 2011-12-31 19:09 |只看该作者
本帖最后由 zmoon 于 2011-12-31 19:12 编辑

补充一个最近遇到的问题

pkg_info | grep samba
samba36-3.6.1       A free SMB and CIFS client and server for UNIX

log.smbd:

  smbd version 3.6.1 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2011/12/31 19:12:29.335506,  0] lib/util_sock.c:602(open_socket_in)
  open_socket_in(): socket() call failed: Protocol not supported
[2011/12/31 19:12:29.335908,  0] smbd/server.c:569(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Protocol not supported
[2011/12/31 19:12:29.336038,  0] lib/util_sock.c:602(open_socket_in)
  open_socket_in(): socket() call failed: Protocol not supported
[2011/12/31 19:12:29.336143,  0] smbd/server.c:569(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Protocol not supported



[global]
加上一行
socket address = 192.168.0.6 192.11.13.6

ip地址应该改为服务器实际IP地址

问题解决

论坛徽章:
0
5 [报告]
发表于 2012-01-01 13:51 |只看该作者
多谢楼上的大大们,我按照你们的方法再试下))

论坛徽章:
0
6 [报告]
发表于 2012-01-02 09:32 |只看该作者
zmoon 发表于 2011-12-31 19:09
补充一个最近遇到的问题

pkg_info | grep samba


按照这个方法设置还是提示上面的错误

论坛徽章:
0
7 [报告]
发表于 2012-01-02 09:33 |只看该作者
本帖最后由 lxc369 于 2012-01-02 09:43 编辑

回复 2# 7looki
可以打开文件夹了,可是无法往里面放文件

补充下:重启smbd服务后多了一条错误提示:
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0] smbd/trans2.c:2901(smbd_do_qfsinfo)
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0] smbd_do_qfsinfo: not an allowed info level(0x102) on IPC$   
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0] lib/util_sock.c:474(read_fd_with_timeout)
Dec 31 17:32:56 dserver smbd[1186]:[2011/12/31 17:32:56.562997,  0]lib/util_sock.c:1432(get_peer_addr_internal)
Dec 31 17:32:56 dserver smbd[1186]:getpeername failed. Error was Transport endpoint is not connected
Dec 31 17:32:56 dserver smbd[1186]:read_fd_with_timeout: client 0.0.0.0 read error = Socket is not connected

论坛徽章:
0
8 [报告]
发表于 2012-01-03 10:29 |只看该作者
还有没有其他的解决方法啊,高手指点下哦
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP