歡迎您光臨本站 註冊首頁

為什麼我的共享文件不能看到 [samba]

←手機掃碼閱讀     火星人 @ 2014-03-05 , reply:0

為什麼我的共享文件不能看到 [samba]

各位高人
  我是個新手 今天整了 一個samba服務 想共享linux下的文件  結果在windows客戶機上只能看到samba伺服器上的共享文件夾  但看不到文件 還有不能在共享目錄中新建文件(從win客戶機遠程)
  smb.conf 文件如下

        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


   comment=Temporary file space
   path = /mnt/text
   read only = no
   writeable = yes
   create mode = 777
   directory mode = 777
   public =yes
共享文件夾 文件如下
# 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


請大家幫我分析一下  錯在那裡 該如何該 才能在客戶機上進行遠程閱讀和編輯文件
《解決方案》

dd

《解決方案》

你getfacl txt
一下看看,應該還是許可權的問題

[ 本帖最後由 lovegqin 於 2007-1-25 21:24 編輯 ]
《解決方案》

謝謝 版主

謝謝版主的 幫助  請問能不能 告訴我getfacl txt 在那個目錄下 我用find找不到

還有 我的目錄許可權設定是 777

# ls -l
總計 6608
-rw-r--r--  1 root root   56869 01-18 16:44 1.jpg
-rwxr-xr--  1 root root       0 12-14 14:12 A1
drwxrwxrwx  3  777 root    4096 01-25 14:06 text
drwxr-xr-x 92 root bin     4096 2003-09-12 webmin-1.110
-rwxr-xr-x  1 root root 6655602 12-12 10:55 webmin-1.110.tar.gz
drwxr-xr-x  2 root root    4096 12-11 19:24 winc

恩 問一句 root建立的 文件件 能被share等級的 samba  windows客戶看到嗎
《解決方案》


getfacl txt

我是讓你查看一下/mnt/txt的許可權
你照做一下
getfacl /mnt/txt
把結果貼出來
《解決方案》

麻煩版主了

照版主的意思做了 結果如下:


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

   另外:謝謝 盡職盡責的版主

  能進共享目錄  能看到共享目錄下的 其他的目錄 但看不到下面文件
而且不能 在 win客戶機上遠程新建文件和目錄  提示:無法創建 沒有足夠許可權  但是大家也看到了 我的目錄 是 777許可權 應該可以的  
  另外我 在win客戶機 查看共享文件夾屬性 看到了目錄容量 和帳號許可權 (顯示 三個帳號 root 777 guest ,許可權是特別許可權 我不能改其許可權 ) 我以為是win客戶機沒有賦予現有帳號許可權(我在客戶機上用的 是管理員帳號  os是windows2003)  於是我在設了一個root帳號  但是還是不行
              這個問題一直纏了我很久 我都不知到如何 學習下去了 希望大家能繼續支持我
《解決方案》

關掉selinux試試
《解決方案》

已經關了SELINUX 一直都沒啟動

應該是這樣
/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

[ 本帖最後由 lovegqin 於 2007-1-26 08:09 編輯 ]
《解決方案》

LZ,請按照我給你設定的selinux的方法設置
應該是這樣
/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
《解決方案》

哈哈 成功了 向斑竹敬禮

謝謝斑竹 謝謝 我現在可以在samba伺服器上做任何的事 謝謝斑竹一直儘力的指導
恩 還有個小小的問題 就是在共享目錄下看到的中文名文件全都是亂碼 是不是smb.conf 中的語言設置不對


:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D

亂碼解決了
   改了(簡體  GB2312)
    unix charset=utf8
      display charset =utf8
     dos charset=cp950

[ 本帖最後由 david_zlm 於 2007-1-26 12:19 編輯 ]

[火星人 ] 為什麼我的共享文件不能看到 [samba]已經有711次圍觀

http://coctec.com/docs/service/show-post-41711.html