LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1546|回复: 6

为什么我的共享文件不能看到 [samba]

[复制链接]
发表于 2007-1-24 21:28:07 | 显示全部楼层 |阅读模式
各位高人
  我是个新手 今天整了 一个samba服务 想共享linux下的文件  结果在windows客户机上只能看到samba服务器上的共享文件夹  但看不到文件 还有不能在共享目录中新建文件(从win客户机远程)
  smb.conf 文件如下
[global]
        netbios name = U113
        server string = Linux Samba Server TestServer
        path = /mnt/text
        workgroup = workgroup
        os level = 20
        null passwords = yes
        guest ok = yes
        user = admin
        security = share
        hosts allow = 192.168.0.
   log file = /var/log/samba/%m.log
   max log size = 50
;        encrypt passwords = no
        guest account = admin
;        encrypt passwords = yes
;        encrypt passwords = yes
   unix charset    = utf8
   display charset = utf8
   dos charset     = cp950

[text]
   comment=Temporary file space
   path = /mnt/text
   read only = no
   writeable = yes
   create mode = 777
   directory mode = 777
   public =yes
共享文件夹 文件如下
[root@U117 text]# ls -l
总计 290276
-rwxrwxrwx 1 root root       458 2004-07-07 a.txt
-rwxrwxrwx 1  777 root   1530776 10-19 23:05 daemon406-x86.exe
drwxr-xr-x 3 root root      4096 12-18 20:53 Java2
-rwxrwxrwx 1 root root 295384898 2005-03-28 JLesson1.rmvb


请大家帮我分析一下  错在那里 该如何该 才能在客户机上进行远程阅读和编辑文件
发表于 2007-1-24 22:10:14 | 显示全部楼层
不能新建文件,有可能是由于/mnt/text文件夹的属性不允许新建,试试:chmod 777 /mnt/text



好运!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-24 22:18:58 | 显示全部楼层

谢谢仁兄

恩  /m nt  /text 的权限  是777   不用该的



  我在几个国内的论坛都发了贴 还是这里回帖的速度最快 ,谢谢大家对新手 的 扶持
回复 支持 反对

使用道具 举报

发表于 2007-1-25 08:41:47 | 显示全部楼层
Post by david_zlm
恩  /m nt  /text 的权限  是777   不用该的



  我在几个国内的论坛都发了贴 还是这里回帖的速度最快 ,谢谢大家对新手 的 扶持

下面是我的global
[global]
  dos charset = cp936
  unix charset = cp936
   workgroup = workgroup
   server string = 文件共享服务器
   netbios name  = 文件共享服务器
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
    security = share
   encrypt passwords = true
   passdb backend = tdbsam guest
   obey pam restrictions = yes
   invalid users = root
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
   load printers = no
   socket options = TCP_NODELAY

下面是一个共享文件夹,可浏览,可新建,编辑,删除
[学校文档]
    comment = Teacher Document
    path = /mnt/TeacherDoc/TDoc
    guest ok = yes
    writable = yes

你比较一下你的GLOBAL,再试试,我个人觉得你的GLOBAL里的PATH(我不太理解这项是什么意思,我从来没有设置过)与GUEST ACCOUNT还有其它几项都不用设,因为你的SAMBA是SHARE模式,我的GLOBAL里也只是加了几项,其它的都是原来就有的.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-25 17:14:37 | 显示全部楼层

谢谢dream3401

我把设置改了改 但是还是老样  能进共享目录  能看到共享目录下的 其他的目录 但看不到下面文件
而且不能 在 win客户机上远程新建文件和目录  提示:无法创建 没有足够权限  但是大家也看到了 我的目录 是 777权限 应该可以的  
  另外我 在win客户机 查看共享文件夹属性 看到了目录容量 和帐号权限 (显示 三个帐号 root 777 guest ,权限是特别权限 我不能改其权限 ) 我以为是win客户机没有赋予现有帐号权限(我在客户机上用的 是管理员帐号  os是windows2003)  于是我在设了一个root帐号  但是还是不行
              这个问题一直缠了我很久 我都不知到如何 学习下去了 希望大家能继续支持我
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-26 00:07:18 | 显示全部楼层

看看 其他的设定资料 大家出出主意

[root@U117 ~]# getfacl /mnt/text
getfacl: Removing leading '/' from absolute path names
# file: mnt/text
# owner: 777
# group: root
user::rwx
group::rwx
other::rwx


这是我的  
/etc/selinux/config设置  

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#        enforcing - SELinux security policy is enforced.
#        permissive - SELinux prints warnings instead of enforcing.
#        disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#        targeted - Only targeted network daemons are protected.
#        strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
set SELINUX=disabled
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-26 11:21:31 | 显示全部楼层

大家好 问题解决了

还是selinux设置的问题  把selinux服务关掉就可以在服务器上做任何操作
在这里要感谢CU 的samba版主 lovegqin-天使 他的一直帮助指导 。还有dream3401的热心关注和指导



/etc/selinux/config设置  

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#        enforcing - SELinux security policy is enforced.
#        permissive - SELinux prints warnings instead of enforcing.
#        disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#        targeted - Only targeted network daemons are protected.
#        strict - Full SELinux protection.
SELINUXTYPE=targeted
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表