centos 5.2 安装smb 无法访问的问题

发布时间:2020-10-07编辑:脚本学堂
配置完smb后,无法访问,错误如下...

配置完smb后,无法访问,错误如下:
context=user_u:system_r:smbd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir
Jul 25 13:44:41 drp smbd[12712]: [2008/07/25 13:44:41, 0] smbd/service.c:make_connection_snum(1003)
Jul 25 13:44:41 drp smbd[12712]:   '/home/test' does not exist or permission denied when connecting to [zwh] Error was 权限不够
Jul 25 13:44:42 drp smbd[12712]: [2008/07/25 13:44:42, 0] smbd/service.c:make_connection_snum(1003)
Jul 25 13:44:42 drp kernel: audit(1216964682.523:195): avc:  denied  { search } for  pid=12712 comm="smbd" name="/" dev=sda6 ino=2

scontext=user_u:system_r:smbd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir
Jul 25 13:44:42 drp smbd[12712]:   '/home/test' does not exist or permission denied when connecting to [zwh] Error was 权限不够
Jul 25 13:47:46 drp restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) Invalid argument
Jul 25 13:48:06 drp kernel: audit(1216964886.760:196): enforcing=0 old_enforcing=1 auid=4294967295

经检查主要是selinux惹的祸,如果不能重启机器,请使用:
#setenforce 0

如果可以,直接禁止selinux即可。