linux work with win

來源:互聯網
上載者:User

環境:x台windows,x台linux
linux 是ubuntu的機器。
主機環境ubuntu 10.04
解決檔案分享權限設定的問題:
      1、samba伺服器的搭建(linux上的檔案系統)
              apt-get  --purge   remove  samba-common  smbclient samba刪除ubuntu自己的smb,
              apt-get  install smba smbfs
apt-get install  samba smbfs(10.10)
#cat   /etc/samba/smb.conf
###
[global]
workgroup = WORKGROUP
security      = share
guest  ok    = yes
[share]共用在網路上看到的檔案名稱
path   =   /work本地的路徑
browseable  = yes
writeable       =yes
檔案結束。
配置二,有使用者權限的。
[global]
workgroup = WORKGROUP
security      = user
guest  ok    = yes
[share]共用在網路上看到的檔案名稱
path   =   /work本地的路徑
browseable  = yes
writeable       =yes
出於安全問題,需要為samba配置密碼:
$ smbpasswd -a <username>
按提示輸入想使用的密碼即可
另外 /etc/samba/smb.conf 的 [global] 段必須有:
security = user

測試命令:#testparm
                    #/etc/init.d/smbd  restart
1.1、windows訪問:
         serverip   是192.168.0.10
          在win的命令輸入口  寫入\\192.168.0.10
1.2、linux訪問:
          mount.cifs    依據smbfs軟體包。。。。。
         mount.cifs   //192.168.0.10/share   ./ss -o user=username%password

         mount.cifs //192.168.0.10/share    ./ss -o  user=, pass=,   匿名並無密碼訪問(widows掛載也是如此)

window  XP 共用檔案的設定:工具-》檔案夾選項-》查看-》使用簡單檔案分享權限設定。必須選上。否則上面命令NG。

             或者:輸入smb://192.168.0.10

    2、nfs檔案系統的搭建(linux上的檔案系統)
          2.1、#apt-get install nfs-kernel-server
                    #gedit   /etc/profile
                                   檔案內容:/work    *(rw,sync,no_root_squash)
                    #/etc/init.d/nfs-kernel-server restart
                    #exportfs   -ra
            2.2、linux機器掛載mount  -t  nfs  192.168.0.10:/work      ./ss
3、tftp   
           #apt-get install tftpd-hpa tftp-hpa
            #gedit   /etc/default/tftpd-hpa
                         TFTP_OPTIONS="-l -c -s"
             #service tftpd-hpa restart

     

(1). 掛載遠程ftp目錄
sudo apt-get install curlftpfs  #安裝軟體
curlftpfs user:pass@ftp.yourdomain.com ~/ftpfolder/ #掛載過程,如果掛載windows下的ftp伺服器目錄,可能會顯示亂碼,可以使用參數 -o pagecode gbk等方式轉碼。

如果ftp沒有密碼就直接

eg:

curlftpfs ftp://ftp.hrbeu.edu.cn ~/ftp -o codepage=gbk

卸載ftp如下

sudo umount ~/ftpfolder/ 
PS:可以加入fstab中,來自動掛載

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.